mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 13:57:10 +00:00
Fix neato possible None state when creating entity (#49746)
This commit is contained in:
parent
4b8e1335bc
commit
b5fdc05f5f
@ -80,7 +80,7 @@ class NeatoSensor(SensorEntity):
|
|||||||
@property
|
@property
|
||||||
def state(self):
|
def state(self):
|
||||||
"""Return the state."""
|
"""Return the state."""
|
||||||
return self._state["details"]["charge"]
|
return self._state["details"]["charge"] if self._state else None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def unit_of_measurement(self):
|
def unit_of_measurement(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user