core/homeassistant/components/mqtt
Jan Bouwhuis 3b2aae5045
Refactor MQTT discovery (#67966)
* Proof of concept

* remove notify platform

* remove loose test

* Add rework from #67912 (#1)

* Move notify serviceupdater to Mixins

* Move tag discovery handler to Mixins

* fix tests

* Add typing for async_load_platform_helper

* Add add entry unload support for notify platform

* Simplify discovery updates

* Remove not needed extra logic

* Cleanup inrelevant or duplicate code

* reuse update_device and move to mixins

* Remove notify platform

* revert changes to notify platform

* Rename update class

* unify tag entry setup

* Use shared code for device_trigger `update_device`

* PoC shared dispatcher for device_trigger

* Fix bugs

* Improve typing - remove async_update

* Unload config_entry and tests

* Release dispatcher after setup and deduplicate

* closures to methods, revert `in` to `=`, updates

* Re-add update support for tag platform

* Re-add update support for device-trigger platform

* Cleanup rediscovery code revert related changes

* Undo discovery code shift

* Update homeassistant/components/mqtt/mixins.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Update homeassistant/components/mqtt/device_trigger.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Update homeassistant/components/mqtt/mixins.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* revert doc string changes

* move conditions

* typing and check config_entry_id

* Update homeassistant/components/mqtt/mixins.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* cleanup not used attribute

* Remove entry_unload code and tests

* update  comment

* add second comment

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-04-15 12:35:08 +02:00
..
device_tracker
light
translations
vacuum
__init__.py
abbreviations.py
alarm_control_panel.py
binary_sensor.py
button.py
camera.py
climate.py
config_flow.py
const.py
cover.py
debug_info.py
device_automation.py
device_trigger.py Refactor MQTT discovery (#67966) 2022-04-15 12:35:08 +02:00
diagnostics.py
discovery.py Refactor MQTT discovery (#67966) 2022-04-15 12:35:08 +02:00
fan.py
humidifier.py
lock.py
manifest.json
mixins.py Refactor MQTT discovery (#67966) 2022-04-15 12:35:08 +02:00
models.py Refactor MQTT discovery (#67966) 2022-04-15 12:35:08 +02:00
number.py
scene.py
select.py
sensor.py
services.yaml
siren.py
strings.json
subscription.py
switch.py
tag.py Refactor MQTT discovery (#67966) 2022-04-15 12:35:08 +02:00
trigger.py
util.py