UniFi - use entity registry disabled_by to control available entities (#26141)

* Move ignoring logic to entity registry enabled default

* Handle config to option import better

* Properly enable and disable entity registry entries on changes from config entry options

* Fix balloobs comments

* Fix some tests

* Fix tests

* Simplify updating disable on entities

* Simplify device tracker update function

* Local entity disabled replaced on rebase

* Only alter entities with changed options

* Proper tracking of changed options

* Back to straightforward updating of disabled
This commit is contained in:
Robert Svensson 2019-08-31 22:04:04 +02:00 committed by GitHub
parent 922522b089
commit d9ef92f6d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 172 additions and 105 deletions

View file

@ -42,12 +42,12 @@ async def test_controller_setup():
{
CONF_HOST: CONTROLLER_DATA[CONF_HOST],
CONF_SITE_ID: "nice name",
controller.CONF_BLOCK_CLIENT: [],
controller.CONF_TRACK_CLIENTS: True,
controller.CONF_TRACK_DEVICES: True,
controller.CONF_TRACK_WIRED_CLIENTS: True,
controller.CONF_DETECTION_TIME: 300,
controller.CONF_SSID_FILTER: [],
controller.CONF_BLOCK_CLIENT: ["mac"],
controller.CONF_DONT_TRACK_CLIENTS: True,
controller.CONF_DONT_TRACK_DEVICES: True,
controller.CONF_DONT_TRACK_WIRED_CLIENTS: True,
controller.CONF_DETECTION_TIME: 30,
controller.CONF_SSID_FILTER: ["ssid"],
}
]
}