FHEM & reconnecting client fixes
This commit is contained in:
@@ -72,6 +72,9 @@ class FhemLight(Light):
|
||||
else:
|
||||
return None
|
||||
|
||||
def refresh(self):
|
||||
self.connection.fhem_set(self._ids[0], 'statusRequest')
|
||||
|
||||
async def async_turn_on(self, **kwargs):
|
||||
brightness = kwargs.get(ATTR_BRIGHTNESS, None)
|
||||
transition_time = kwargs.get(ATTR_TRANSITION, 0.5)
|
||||
@@ -124,6 +127,7 @@ class FhemLight(Light):
|
||||
pass
|
||||
await self.async_update_ha_state()
|
||||
elif line.startswith('ResndFail') or line.startswith('MISSING ACK'):
|
||||
_LOGGER.warning(f"FHEM light {self.name} became unavailable: '{line}'")
|
||||
self._available = False
|
||||
await self.async_update_ha_state()
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user