mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Make state unknown if None returned
This commit is contained in:
parent
8857c48c17
commit
06bd812b7b
@ -145,7 +145,7 @@ class Entity(object):
|
|||||||
if force_refresh:
|
if force_refresh:
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
state = str(self.state)
|
state = STATE_UNKNOWN if self.state is None else str(self.state)
|
||||||
attr = self.state_attributes or {}
|
attr = self.state_attributes or {}
|
||||||
|
|
||||||
device_attr = self.device_state_attributes
|
device_attr = self.device_state_attributes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user