Commit graph

4 commits

Author SHA1 Message Date
Jan Bouwhuis
1773f2aadc
Allow MQTT device based auto discovery (#118757)
* Allow MQTT device based auto discovery

* Fix merge error

* Remove unused import

* Fix discovery device based topics

* Fix cannot delete twice

* Improve cleanup test

* Follow up comment

* Typo

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

* Explain more

* Use tuple

* Default a device payload to have priority over a platform based payload

* Add unique_id to sensor test data

* Set migration flag to mark a discovery topic for migration

* Correct type hint

* Make unique_id required for components in device based discovery payload

* Remove CONF_MIGRATE_DISCOVERY from platform schema

* Unload discovered MQTT item to allow migration

* Follow up comments from code review

* ruff

* Subscribe to platform discovery wildcards first

* Use normal dict

* Use dict to persist wildcard subscription order

* Remove missed unused parameter

* Add a comment to explain we use a dict  to preserve the subscription order

* Add wildcard subscription order test

* Remove discovery flag from test

* Improve discovery migration origin logging

* Assert initial  wildcard discovery topics subscription order and after reconnect

* Improve log messages

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-10-30 17:10:15 +01:00
Jan Bouwhuis
4b63829eef
Allow to set entity picture on mqtt entity platforms (#128404) 2024-10-25 20:16:11 +02:00
Jan Bouwhuis
bafc42c8f1
Cleanup unused protocol class for mqtt entity setup (#126276) 2024-09-19 21:29:14 +02:00
Jan Bouwhuis
21affac571
Rename mqtt mixins module to entity.py (#126279) 2024-09-19 20:50:33 +02:00
Renamed from homeassistant/components/mqtt/mixins.py (Browse further)