From 10bc05df00a3e90cb0d4134271b627d51ea78849 Mon Sep 17 00:00:00 2001 From: Santobert Date: Wed, 13 Jan 2021 10:23:16 +0100 Subject: [PATCH] Fix neato battery sensor not ready (#44946) * Fix neato battery sensor not ready * Edit available attribute * Remove unnecessary condition --- homeassistant/components/neato/sensor.py | 2 +- homeassistant/components/neato/switch.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/neato/sensor.py b/homeassistant/components/neato/sensor.py index b083ec1d7df..50af42e7007 100644 --- a/homeassistant/components/neato/sensor.py +++ b/homeassistant/components/neato/sensor.py @@ -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 diff --git a/homeassistant/components/neato/switch.py b/homeassistant/components/neato/switch.py index 204adb108a8..a3cc51b82c6 100644 --- a/homeassistant/components/neato/switch.py +++ b/homeassistant/components/neato/switch.py @@ -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