Fix UniFi block client switches on 2022.11.2 (#81884)

fixes undefined
This commit is contained in:
Robert Svensson
2022-11-15 18:30:56 +01:00
committed by GitHub
parent d88b2bf19c
commit f9ebbb936a

View File

@@ -367,8 +367,6 @@ class UnifiBlockClientSwitch(SwitchEntity):
self.hass.async_create_task(self.remove_item({self._obj_id}))
return
client = self.controller.api.clients[self._obj_id]
self._attr_is_on = not client.blocked
self._attr_available = self.controller.available
self.async_write_ha_state()