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:
@@ -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
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user