Bugfix homematic available modus (#11256)

pull/11261/head
Pascal Vizeli 2017-12-20 23:59:11 +01:00 committed by Fabian Affolter
parent b28bfad496
commit 1d579587c1
1 changed files with 3 additions and 4 deletions

View File

@ -749,10 +749,6 @@ class HMDevice(Entity):
"""Return device specific state attributes."""
attr = {}
# No data available
if not self.available:
return attr
# Generate a dictionary with attributes
for node, data in HM_ATTRIBUTE_SUPPORT.items():
# Is an attribute and exists for this object
@ -808,6 +804,9 @@ class HMDevice(Entity):
if attribute == 'UNREACH':
self._available = bool(value)
has_changed = True
elif not self.available:
self._available = False
has_changed = True
# If it has changed data point, update HASS
if has_changed: