Reload config entry when entity enabled in entity registry, remove entity if disabled. (#26120)

* Reload config entry when disabled_by updated in entity registry

* Add types

* Remove entities that get disabled

* Remove unnecessary domain checks.

* Attach handler in async_setup

* Remove unused var

* Type

* Fix test

* Fix tests
This commit is contained in:
Paulus Schoutsen authored and Andrew Sayre committed 2019-08-22 19:32:43 -05:00
1 parent a4eeaac24c
commit f704a8e90e
7 files changed
+219 -12

No files matched your search

@@ -163,6 +163,7 @@ async def test_update_entity(hass, client):
msg = await client.receive_json()
assert hass.states.get("test_domain.world") is None
assert registry.entities["test_domain.world"].disabled_by == "user"
# UPDATE DISABLED_BY TO NONE