1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Allow extra keys in MQTT discovery messages (#58390)

* Allow extra keys in MQTT discovery messages

* Remove extra keys
This commit is contained in:
Erik Montnemery
2021-10-25 13:47:06 +02:00
committed by GitHub
parent a8a8b532d0
commit 640a7fee9d
44 changed files with 628 additions and 480 deletions

View File

@@ -344,15 +344,19 @@ async def test_discovery_removal_number(hass, mqtt_mock, caplog):
async def test_discovery_update_number(hass, mqtt_mock, caplog):
"""Test update of discovered number."""
data1 = (
'{ "name": "Beer", "state_topic": "test-topic", "command_topic": "test-topic"}'
)
data2 = (
'{ "name": "Milk", "state_topic": "test-topic", "command_topic": "test-topic"}'
)
config1 = {
"name": "Beer",
"state_topic": "test-topic",
"command_topic": "test-topic",
}
config2 = {
"name": "Milk",
"state_topic": "test-topic",
"command_topic": "test-topic",
}
await help_test_discovery_update(
hass, mqtt_mock, caplog, number.DOMAIN, data1, data2
hass, mqtt_mock, caplog, number.DOMAIN, config1, config2
)