UniFi - Fix disabled entities being enabled after a restart (#35819)

* Async remove call removed too much, resulting in disabled entities coming back after a restart

* Calling super().async_remove is no longer needed, changed to self.async_remove

* Yes, they should be sets...
This commit is contained in:
Robert Svensson authored and GitHub committed 2020-05-19 23:57:41 +02:00
1 parent 28db0cebf0
commit 648df6d984
4 files changed
+25 -27

No files matched your search

+1 -1
View File
@@ -73,7 +73,7 @@ class UniFiBandwidthSensor(UniFiClient):
async def options_updated(self) -> None:
"""Config entry options are updated, remove entity if option is disabled."""
if not self.controller.option_allow_bandwidth_sensors:
await self.async_remove()
await self.remove_item({self.client.mac})
class UniFiRxBandwidthSensor(UniFiBandwidthSensor):