Fix problem with restoring POE control (#30597)
parent
0b3b589457
commit
5a8311e9d8
|
@ -42,12 +42,15 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
|
|||
|
||||
_, mac = entity.unique_id.split("-", 1)
|
||||
|
||||
if mac in controller.api.clients or mac not in controller.api.clients_all:
|
||||
if mac in controller.api.clients:
|
||||
switches_off.append(entity.unique_id)
|
||||
continue
|
||||
|
||||
client = controller.api.clients_all[mac]
|
||||
controller.api.clients.process_raw([client.raw])
|
||||
switches_off.append(entity.unique_id)
|
||||
if mac in controller.api.clients_all:
|
||||
client = controller.api.clients_all[mac]
|
||||
controller.api.clients.process_raw([client.raw])
|
||||
switches_off.append(entity.unique_id)
|
||||
continue
|
||||
|
||||
@callback
|
||||
def update_controller():
|
||||
|
|
Loading…
Reference in New Issue