mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Bugfix homematic available modus (#11256)
This commit is contained in:
parent
b28bfad496
commit
1d579587c1
@ -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…
x
Reference in New Issue
Block a user