Cleanup entity and device registry on MQTT discovery removal (#32693)
* Cleanup entity and device registry on MQTT discovery removal. * Review comments
This commit is contained in:
parent
5f5cb8bea8
commit
8bc542776b
17 changed files with 466 additions and 17 deletions
|
@ -30,6 +30,7 @@ from .common import (
|
|||
help_test_discovery_removal,
|
||||
help_test_discovery_update,
|
||||
help_test_discovery_update_attr,
|
||||
help_test_entity_device_info_remove,
|
||||
help_test_entity_device_info_update,
|
||||
help_test_entity_device_info_with_identifier,
|
||||
help_test_entity_id_update,
|
||||
|
@ -893,6 +894,19 @@ async def test_entity_device_info_update(hass, mqtt_mock):
|
|||
)
|
||||
|
||||
|
||||
async def test_entity_device_info_remove(hass, mqtt_mock):
|
||||
"""Test device registry remove."""
|
||||
config = {
|
||||
"platform": "mqtt",
|
||||
"name": "Test 1",
|
||||
"power_state_topic": "test-topic",
|
||||
"power_command_topic": "test-command-topic",
|
||||
"device": {"identifiers": ["helloworld"]},
|
||||
"unique_id": "veryunique",
|
||||
}
|
||||
await help_test_entity_device_info_remove(hass, mqtt_mock, CLIMATE_DOMAIN, config)
|
||||
|
||||
|
||||
async def test_entity_id_update(hass, mqtt_mock):
|
||||
"""Test MQTT subscriptions are managed when entity_id is updated."""
|
||||
config = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue