Skip to content

Commit

Permalink
Apply review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck committed Jul 21, 2021
1 parent f54212d commit 42f1cfd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion homeassistant/components/mqtt/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,10 @@ def message_received(msg):
if value_template is not None:
payload = value_template.async_render_with_possible_json_value(payload)

if payload not in self.options and payload != "None":
if payload.lower() == "none":
payload = None

if payload is not None and payload not in self.options:
_LOGGER.error(
"Invalid option for %s: '%s' (valid options: %s)",
self.entity_id,
Expand Down

0 comments on commit 42f1cfd

Please sign in to comment.