mirror of
https://github.com/home-assistant/core.git
synced 2025-05-31 03:07:06 +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
|
||||
def state(self):
|
||||
"""Return the state."""
|
||||
return self._state["details"]["charge"]
|
||||
return self._state["details"]["charge"] if self._state else None
|
||||
|
||||
@property
|
||||
def unit_of_measurement(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user