Fix neato battery sensor not ready (#44946)

* Fix neato battery sensor not ready

* Edit available attribute

* Remove unnecessary condition
This commit is contained in:
Santobert 2021-01-13 10:23:16 +01:00 committed by GitHub
parent ac60b34d17
commit 10bc05df00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -37,7 +37,7 @@ class NeatoSensor(Entity):
def __init__(self, neato, robot):
"""Initialize Neato sensor."""
self.robot = robot
self._available = neato is not None
self._available = False
self._robot_name = f"{self.robot.name} {BATTERY}"
self._robot_serial = self.robot.serial
self._state = None

View file

@ -40,7 +40,7 @@ class NeatoConnectedSwitch(ToggleEntity):
"""Initialize the Neato Connected switches."""
self.type = switch_type
self.robot = robot
self._available = neato is not None
self._available = False
self._robot_name = f"{self.robot.name} {SWITCH_TYPES[self.type][0]}"
self._state = None
self._schedule_state = None