mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Improve code readability in iBeacon integration (#78844)
This commit is contained in:
parent
bc120e9ff2
commit
a981d096aa
@ -152,11 +152,9 @@ class IBeaconCoordinator:
|
|||||||
"""Ignore an address that does not follow the spec and any entities created by it."""
|
"""Ignore an address that does not follow the spec and any entities created by it."""
|
||||||
self._ignore_addresses.add(address)
|
self._ignore_addresses.add(address)
|
||||||
self._async_cancel_unavailable_tracker(address)
|
self._async_cancel_unavailable_tracker(address)
|
||||||
self.hass.config_entries.async_update_entry(
|
entry_data = self._entry.data
|
||||||
self._entry,
|
new_data = entry_data | {CONF_IGNORE_ADDRESSES: list(self._ignore_addresses)}
|
||||||
data=self._entry.data
|
self.hass.config_entries.async_update_entry(self._entry, data=new_data)
|
||||||
| {CONF_IGNORE_ADDRESSES: sorted(self._ignore_addresses)},
|
|
||||||
)
|
|
||||||
self._async_purge_untrackable_entities(self._unique_ids_by_address[address])
|
self._async_purge_untrackable_entities(self._unique_ids_by_address[address])
|
||||||
self._group_ids_by_address.pop(address)
|
self._group_ids_by_address.pop(address)
|
||||||
self._unique_ids_by_address.pop(address)
|
self._unique_ids_by_address.pop(address)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user