Fixes in fhem & lirc (in reconnection_client)
This commit is contained in:
parent
1a746d1438
commit
a047167b94
|
@ -45,7 +45,10 @@ class FhemConnection(ReconnectingClient):
|
||||||
"displayattr .*\n".encode(),
|
"displayattr .*\n".encode(),
|
||||||
])
|
])
|
||||||
|
|
||||||
async def _update_all_devices(self, _):
|
async def _update_all_devices(self, state):
|
||||||
|
if state == 'connected':
|
||||||
|
self.write_line("displayattr .*")
|
||||||
|
self.write_line("inform on")
|
||||||
for device_list in self._devices.values():
|
for device_list in self._devices.values():
|
||||||
for device in device_list:
|
for device in device_list:
|
||||||
await device.async_update_ha_state()
|
await device.async_update_ha_state()
|
||||||
|
|
|
@ -22,7 +22,6 @@ CONFIG_SCHEMA = vol.Schema({
|
||||||
|
|
||||||
|
|
||||||
async def async_setup(hass, config):
|
async def async_setup(hass, config):
|
||||||
_LOGGER.warning(f"Config is {config[DOMAIN]}")
|
|
||||||
for config_element in config[DOMAIN]:
|
for config_element in config[DOMAIN]:
|
||||||
connection = LircConnection(hass, config_element)
|
connection = LircConnection(hass, config_element)
|
||||||
await connection.start()
|
await connection.start()
|
||||||
|
|
|
@ -48,10 +48,6 @@ class ReconnectingClient:
|
||||||
await self._connection_status_changed_callback('connected')
|
await self._connection_status_changed_callback('connected')
|
||||||
|
|
||||||
self.reconnect_time = self.reconnect_time_start
|
self.reconnect_time = self.reconnect_time_start
|
||||||
writer.writelines([
|
|
||||||
"displayattr .*\n".encode(),
|
|
||||||
"inform on\n".encode(),
|
|
||||||
])
|
|
||||||
while self._run:
|
while self._run:
|
||||||
line = await reader.readline()
|
line = await reader.readline()
|
||||||
if not line:
|
if not line:
|
||||||
|
|
Loading…
Reference in New Issue