Make state unknown if None returned

pull/1223/head
Paulus Schoutsen 2016-02-12 08:58:07 -08:00
parent 8857c48c17
commit 06bd812b7b
1 changed files with 1 additions and 1 deletions
homeassistant/helpers

View File

@ -145,7 +145,7 @@ class Entity(object):
if force_refresh:
self.update()
state = str(self.state)
state = STATE_UNKNOWN if self.state is None else str(self.state)
attr = self.state_attributes or {}
device_attr = self.device_state_attributes