core/tests/components/mqtt
Jan Bouwhuis 585892f067
Allow MQTT device based auto discovery (#109030)
* Add MQTT device based auto discovery

* Respect override of component options over shared ones

* Add state_topic, command_topic, qos and encoding as shared options

* Add shared option test

* Rename device.py to schemas.py

* Remove unused legacy `platform` attribute to avoid confusion

* Split validation device and origin info

* Require `origin` info on device based discovery

* Log origin info for only once for device discovery

* Fix tests and linters

* ruff

* speed up _replace_all_abbreviations

* Fix imports and merging errors - add slots attr

* Fix unrelated const changes

* More unrelated changes

* join string

* fix merge

* Undo move

* Adjust logger statement

* fix task storm to load platforms

* Revert "fix task storm to load platforms"

This reverts commit 8f12a5f251.

* bail if logging is disabled

* Correct mixup object_id and node_id

* Auto migrate entities to device discovery

* Add device discovery test for device_trigger

* Add migration support for non entity platforms

* Use helper to remove discovery payload

* Fix tests after update branch

* Add discovery migration test

* Refactor

* Repair after rebase

* Fix discovery is broken after migration

* Improve comments

* More comment improvements

* Split long lines

* Add comment to indicate payload dict can be empty

* typo

* Add walrus and update comment

* Add tag to migration test

* Join try blocks

* Refactor

* Cleanup not used attribute

* Refactor

* Move _replace_all_abbreviations out of try block

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-05-29 11:12:05 +02:00
..
__init__.py
conftest.py Allow MQTT device based auto discovery (#109030) 2024-05-29 11:12:05 +02:00
test_alarm_control_panel.py Add default code to alarm_control_panel (#112540) 2024-05-29 10:46:53 +02:00
test_binary_sensor.py
test_button.py
test_camera.py
test_climate.py Consequently ignore empty MQTT state payloads and set state to `unknown` on "None" payload (#117813) 2024-05-25 01:29:43 +02:00
test_common.py Simplify mqtt connection state dispatcher (#118184) 2024-05-26 10:21:21 -10:00
test_config_flow.py Cleanup removed MQTT broker settings (#116633) 2024-05-02 20:37:21 +02:00
test_cover.py Consequently ignore empty MQTT state payloads and set state to `unknown` on "None" payload (#117813) 2024-05-25 01:29:43 +02:00
test_device_tracker.py Fix mqtt not publishing null payload payload to remove discovery (#118261) 2024-05-27 12:53:22 -10:00
test_device_trigger.py Allow MQTT device based auto discovery (#109030) 2024-05-29 11:12:05 +02:00
test_diagnostics.py Use registry fixtures in tests (m-n) (#118291) 2024-05-28 13:40:45 +02:00
test_discovery.py Allow MQTT device based auto discovery (#109030) 2024-05-29 11:12:05 +02:00
test_event.py
test_fan.py
test_humidifier.py
test_image.py
test_init.py Allow MQTT device based auto discovery (#109030) 2024-05-29 11:12:05 +02:00
test_lawn_mower.py
test_legacy_vacuum.py
test_light.py
test_light_json.py Fix invalid tuple annotations (#116035) 2024-04-23 16:02:16 +02:00
test_light_template.py
test_lock.py Consequently ignore empty MQTT state payloads and set state to `unknown` on "None" payload (#117813) 2024-05-25 01:29:43 +02:00
test_mixins.py Simplify MQTT subscribe debouncer execution (#117006) 2024-05-07 14:41:31 -05:00
test_notify.py
test_number.py
test_scene.py
test_select.py Consequently ignore empty MQTT state payloads and set state to `unknown` on "None" payload (#117813) 2024-05-25 01:29:43 +02:00
test_sensor.py Improve error logging on invalid MQTT entity state (#118006) 2024-05-24 13:11:52 +02:00
test_siren.py Update codespell to 2.3.0 (#118001) 2024-05-24 08:22:29 +02:00
test_subscription.py Avoid expensive inspection of callbacks to setup mqtt subscriptions (#118161) 2024-05-26 01:22:44 -10:00
test_switch.py
test_tag.py Allow MQTT device based auto discovery (#109030) 2024-05-29 11:12:05 +02:00
test_text.py Improve error logging on invalid MQTT entity state (#118006) 2024-05-24 13:11:52 +02:00
test_trigger.py Improve typing for `calls` fixture in tests (m-z) (#118350) 2024-05-29 09:30:41 +02:00
test_update.py
test_util.py
test_vacuum.py
test_valve.py Consequently ignore empty MQTT state payloads and set state to `unknown` on "None" payload (#117813) 2024-05-25 01:29:43 +02:00
test_water_heater.py Consequently ignore empty MQTT state payloads and set state to `unknown` on "None" payload (#117813) 2024-05-25 01:29:43 +02:00