Fix neato possible None state when creating entity (#49746)
This commit is contained in:
parent
4b8e1335bc
commit
b5fdc05f5f
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue