Bugfix homematic available modus (#11256)
This commit is contained in:
parent
794cfb7976
commit
889eef78e4
1 changed files with 3 additions and 4 deletions
|
@ -749,10 +749,6 @@ class HMDevice(Entity):
|
||||||
"""Return device specific state attributes."""
|
"""Return device specific state attributes."""
|
||||||
attr = {}
|
attr = {}
|
||||||
|
|
||||||
# No data available
|
|
||||||
if not self.available:
|
|
||||||
return attr
|
|
||||||
|
|
||||||
# Generate a dictionary with attributes
|
# Generate a dictionary with attributes
|
||||||
for node, data in HM_ATTRIBUTE_SUPPORT.items():
|
for node, data in HM_ATTRIBUTE_SUPPORT.items():
|
||||||
# Is an attribute and exists for this object
|
# Is an attribute and exists for this object
|
||||||
|
@ -808,6 +804,9 @@ class HMDevice(Entity):
|
||||||
if attribute == 'UNREACH':
|
if attribute == 'UNREACH':
|
||||||
self._available = bool(value)
|
self._available = bool(value)
|
||||||
has_changed = True
|
has_changed = True
|
||||||
|
elif not self.available:
|
||||||
|
self._available = False
|
||||||
|
has_changed = True
|
||||||
|
|
||||||
# If it has changed data point, update HASS
|
# If it has changed data point, update HASS
|
||||||
if has_changed:
|
if has_changed:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue