From 24914aade50f7f4f813380b58292d5e91dc47f41 Mon Sep 17 00:00:00 2001 From: Brian Towles <brian@towles.com> Date: Sat, 9 Feb 2019 09:01:02 -0600 Subject: [PATCH] Set August doorbell availability state from online state (#20883) The available state for the August Doorbell is currently set based on the state of the binary ding sensor. This means that if there is no door bell rings in a while on startup the doorbell is shown as Unavailable (#20421) . This ties the availability of the doorbell to the actual online state thats in the device information retrieved from august so that even if there has not been a doorbell ring activity on a while the device shows as online when it is. --- homeassistant/components/august/binary_sensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/august/binary_sensor.py b/homeassistant/components/august/binary_sensor.py index 4116a791b01..581b7a3e0df 100644 --- a/homeassistant/components/august/binary_sensor.py +++ b/homeassistant/components/august/binary_sensor.py @@ -181,4 +181,4 @@ class AugustDoorbellBinarySensor(BinarySensorDevice): """Get the latest state of the sensor.""" state_provider = SENSOR_TYPES_DOORBELL[self._sensor_type][2] self._state = state_provider(self._data, self._doorbell) - self._available = self._state is not None + self._available = self._doorbell.is_online