Disable extra=vol.ALLOW_EXTRA for MQTT platforms. (#20562)
This commit is contained in:
parent
48f0e8311b
commit
89fc3b2a1b
22 changed files with 67 additions and 56 deletions
|
@ -379,7 +379,7 @@ async def test_discovery_removal_alarm(hass, mqtt_mock, caplog):
|
|||
|
||||
data = (
|
||||
'{ "name": "Beer",'
|
||||
' "status_topic": "test_topic",'
|
||||
' "state_topic": "test_topic",'
|
||||
' "command_topic": "test_topic" }'
|
||||
)
|
||||
|
||||
|
@ -409,12 +409,12 @@ async def test_discovery_update_alarm(hass, mqtt_mock, caplog):
|
|||
|
||||
data1 = (
|
||||
'{ "name": "Beer",'
|
||||
' "status_topic": "test_topic",'
|
||||
' "state_topic": "test_topic",'
|
||||
' "command_topic": "test_topic" }'
|
||||
)
|
||||
data2 = (
|
||||
'{ "name": "Milk",'
|
||||
' "status_topic": "test_topic",'
|
||||
' "state_topic": "test_topic",'
|
||||
' "command_topic": "test_topic" }'
|
||||
)
|
||||
|
||||
|
@ -451,7 +451,7 @@ async def test_discovery_broken(hass, mqtt_mock, caplog):
|
|||
)
|
||||
data2 = (
|
||||
'{ "name": "Milk",'
|
||||
' "status_topic": "test_topic",'
|
||||
' "state_topic": "test_topic",'
|
||||
' "command_topic": "test_topic" }'
|
||||
)
|
||||
|
||||
|
|
|
@ -344,12 +344,12 @@ async def test_discovery_update_attr(hass, mqtt_mock, caplog):
|
|||
await async_start(hass, 'homeassistant', {}, entry)
|
||||
data1 = (
|
||||
'{ "name": "Beer",'
|
||||
' "command_topic": "test_topic",'
|
||||
' "state_topic": "test_topic",'
|
||||
' "json_attributes_topic": "attr-topic1" }'
|
||||
)
|
||||
data2 = (
|
||||
'{ "name": "Beer",'
|
||||
' "command_topic": "test_topic",'
|
||||
' "state_topic": "test_topic",'
|
||||
' "json_attributes_topic": "attr-topic2" }'
|
||||
)
|
||||
async_fire_mqtt_message(hass, 'homeassistant/binary_sensor/bla/config',
|
||||
|
@ -540,7 +540,6 @@ async def test_entity_device_info_update(hass, mqtt_mock):
|
|||
'platform': 'mqtt',
|
||||
'name': 'Test 1',
|
||||
'state_topic': 'test-topic',
|
||||
'command_topic': 'test-command-topic',
|
||||
'device': {
|
||||
'identifiers': ['helloworld'],
|
||||
'connections': [
|
||||
|
|
|
@ -1177,13 +1177,13 @@ async def test_unique_id(hass):
|
|||
light.DOMAIN: [{
|
||||
'platform': 'mqtt',
|
||||
'name': 'Test 1',
|
||||
'status_topic': 'test-topic',
|
||||
'state_topic': 'test-topic',
|
||||
'command_topic': 'test_topic',
|
||||
'unique_id': 'TOTALLY_UNIQUE'
|
||||
}, {
|
||||
'platform': 'mqtt',
|
||||
'name': 'Test 2',
|
||||
'status_topic': 'test-topic',
|
||||
'state_topic': 'test-topic',
|
||||
'command_topic': 'test_topic',
|
||||
'unique_id': 'TOTALLY_UNIQUE'
|
||||
}]
|
||||
|
@ -1200,7 +1200,7 @@ async def test_discovery_removal_light(hass, mqtt_mock, caplog):
|
|||
|
||||
data = (
|
||||
'{ "name": "Beer",'
|
||||
' "status_topic": "test_topic",'
|
||||
' "state_topic": "test_topic",'
|
||||
' "command_topic": "test_topic" }'
|
||||
)
|
||||
|
||||
|
@ -1245,12 +1245,12 @@ async def test_discovery_update_light(hass, mqtt_mock, caplog):
|
|||
|
||||
data1 = (
|
||||
'{ "name": "Beer",'
|
||||
' "status_topic": "test_topic",'
|
||||
' "state_topic": "test_topic",'
|
||||
' "command_topic": "test_topic" }'
|
||||
)
|
||||
data2 = (
|
||||
'{ "name": "Milk",'
|
||||
' "status_topic": "test_topic",'
|
||||
' "state_topic": "test_topic",'
|
||||
' "command_topic": "test_topic" }'
|
||||
)
|
||||
|
||||
|
@ -1284,7 +1284,7 @@ async def test_discovery_broken(hass, mqtt_mock, caplog):
|
|||
)
|
||||
data2 = (
|
||||
'{ "name": "Milk",'
|
||||
' "status_topic": "test_topic",'
|
||||
' "state_topic": "test_topic",'
|
||||
' "command_topic": "test_topic" }'
|
||||
)
|
||||
|
||||
|
|
|
@ -649,14 +649,14 @@ async def test_unique_id(hass):
|
|||
'platform': 'mqtt',
|
||||
'name': 'Test 1',
|
||||
'schema': 'json',
|
||||
'status_topic': 'test-topic',
|
||||
'state_topic': 'test-topic',
|
||||
'command_topic': 'test_topic',
|
||||
'unique_id': 'TOTALLY_UNIQUE'
|
||||
}, {
|
||||
'platform': 'mqtt',
|
||||
'name': 'Test 2',
|
||||
'schema': 'json',
|
||||
'status_topic': 'test-topic',
|
||||
'state_topic': 'test-topic',
|
||||
'command_topic': 'test_topic',
|
||||
'unique_id': 'TOTALLY_UNIQUE'
|
||||
}]
|
||||
|
@ -714,13 +714,13 @@ async def test_discovery_update_light(hass, mqtt_mock, caplog):
|
|||
data1 = (
|
||||
'{ "name": "Beer",'
|
||||
' "schema": "json",'
|
||||
' "status_topic": "test_topic",'
|
||||
' "state_topic": "test_topic",'
|
||||
' "command_topic": "test_topic" }'
|
||||
)
|
||||
data2 = (
|
||||
'{ "name": "Milk",'
|
||||
' "schema": "json",'
|
||||
' "status_topic": "test_topic",'
|
||||
' "state_topic": "test_topic",'
|
||||
' "command_topic": "test_topic" }'
|
||||
)
|
||||
|
||||
|
@ -755,7 +755,7 @@ async def test_discovery_broken(hass, mqtt_mock, caplog):
|
|||
data2 = (
|
||||
'{ "name": "Milk",'
|
||||
' "schema": "json",'
|
||||
' "status_topic": "test_topic",'
|
||||
' "state_topic": "test_topic",'
|
||||
' "command_topic": "test_topic" }'
|
||||
)
|
||||
|
||||
|
|
|
@ -265,7 +265,6 @@ async def test_optimistic(hass, mqtt_mock):
|
|||
'{{ blue|d }}',
|
||||
'command_off_template': 'off',
|
||||
'effect_list': ['colorloop', 'random'],
|
||||
'effect_command_topic': 'test_light_rgb/effect/set',
|
||||
'qos': 2
|
||||
}
|
||||
})
|
||||
|
@ -608,7 +607,7 @@ async def test_unique_id(hass):
|
|||
'platform': 'mqtt',
|
||||
'name': 'Test 1',
|
||||
'schema': 'template',
|
||||
'status_topic': 'test-topic',
|
||||
'state_topic': 'test-topic',
|
||||
'command_topic': 'test_topic',
|
||||
'command_on_template': 'on,{{ transition }}',
|
||||
'command_off_template': 'off,{{ transition|d }}',
|
||||
|
@ -617,7 +616,7 @@ async def test_unique_id(hass):
|
|||
'platform': 'mqtt',
|
||||
'name': 'Test 2',
|
||||
'schema': 'template',
|
||||
'status_topic': 'test-topic',
|
||||
'state_topic': 'test-topic',
|
||||
'command_topic': 'test_topic',
|
||||
'unique_id': 'TOTALLY_UNIQUE'
|
||||
}]
|
||||
|
@ -679,7 +678,7 @@ async def test_discovery_update_light(hass, mqtt_mock, caplog):
|
|||
data1 = (
|
||||
'{ "name": "Beer",'
|
||||
' "schema": "template",'
|
||||
' "status_topic": "test_topic",'
|
||||
' "state_topic": "test_topic",'
|
||||
' "command_topic": "test_topic",'
|
||||
' "command_on_template": "on",'
|
||||
' "command_off_template": "off"}'
|
||||
|
@ -687,7 +686,7 @@ async def test_discovery_update_light(hass, mqtt_mock, caplog):
|
|||
data2 = (
|
||||
'{ "name": "Milk",'
|
||||
' "schema": "template",'
|
||||
' "status_topic": "test_topic",'
|
||||
' "state_topic": "test_topic",'
|
||||
' "command_topic": "test_topic",'
|
||||
' "command_on_template": "on",'
|
||||
' "command_off_template": "off"}'
|
||||
|
@ -724,7 +723,7 @@ async def test_discovery_broken(hass, mqtt_mock, caplog):
|
|||
data2 = (
|
||||
'{ "name": "Milk",'
|
||||
' "schema": "template",'
|
||||
' "status_topic": "test_topic",'
|
||||
' "state_topic": "test_topic",'
|
||||
' "command_topic": "test_topic",'
|
||||
' "command_on_template": "on",'
|
||||
' "command_off_template": "off"}'
|
||||
|
|
|
@ -246,13 +246,13 @@ async def test_unique_id(hass):
|
|||
lock.DOMAIN: [{
|
||||
'platform': 'mqtt',
|
||||
'name': 'Test 1',
|
||||
'status_topic': 'test-topic',
|
||||
'state_topic': 'test-topic',
|
||||
'command_topic': 'test_topic',
|
||||
'unique_id': 'TOTALLY_UNIQUE'
|
||||
}, {
|
||||
'platform': 'mqtt',
|
||||
'name': 'Test 2',
|
||||
'status_topic': 'test-topic',
|
||||
'state_topic': 'test-topic',
|
||||
'command_topic': 'test_topic',
|
||||
'unique_id': 'TOTALLY_UNIQUE'
|
||||
}]
|
||||
|
|
|
@ -428,12 +428,12 @@ async def test_discovery_update_attr(hass, mqtt_mock, caplog):
|
|||
await async_start(hass, 'homeassistant', {}, entry)
|
||||
data1 = (
|
||||
'{ "name": "Beer",'
|
||||
' "command_topic": "test_topic",'
|
||||
' "state_topic": "test_topic",'
|
||||
' "json_attributes_topic": "attr-topic1" }'
|
||||
)
|
||||
data2 = (
|
||||
'{ "name": "Beer",'
|
||||
' "command_topic": "test_topic",'
|
||||
' "state_topic": "test_topic",'
|
||||
' "json_attributes_topic": "attr-topic2" }'
|
||||
)
|
||||
async_fire_mqtt_message(hass, 'homeassistant/sensor/bla/config',
|
||||
|
@ -495,7 +495,7 @@ async def test_discovery_removal_sensor(hass, mqtt_mock, caplog):
|
|||
await async_start(hass, 'homeassistant', {}, entry)
|
||||
data = (
|
||||
'{ "name": "Beer",'
|
||||
' "status_topic": "test_topic" }'
|
||||
' "state_topic": "test_topic" }'
|
||||
)
|
||||
async_fire_mqtt_message(hass, 'homeassistant/sensor/bla/config',
|
||||
data)
|
||||
|
@ -517,11 +517,11 @@ async def test_discovery_update_sensor(hass, mqtt_mock, caplog):
|
|||
await async_start(hass, 'homeassistant', {}, entry)
|
||||
data1 = (
|
||||
'{ "name": "Beer",'
|
||||
' "status_topic": "test_topic" }'
|
||||
' "state_topic": "test_topic" }'
|
||||
)
|
||||
data2 = (
|
||||
'{ "name": "Milk",'
|
||||
' "status_topic": "test_topic" }'
|
||||
' "state_topic": "test_topic" }'
|
||||
)
|
||||
async_fire_mqtt_message(hass, 'homeassistant/sensor/bla/config',
|
||||
data1)
|
||||
|
@ -626,7 +626,6 @@ async def test_entity_device_info_update(hass, mqtt_mock):
|
|||
'platform': 'mqtt',
|
||||
'name': 'Test 1',
|
||||
'state_topic': 'test-topic',
|
||||
'command_topic': 'test-command-topic',
|
||||
'device': {
|
||||
'identifiers': ['helloworld'],
|
||||
'connections': [
|
||||
|
|
|
@ -392,7 +392,7 @@ async def test_discovery_removal_switch(hass, mqtt_mock, caplog):
|
|||
|
||||
data = (
|
||||
'{ "name": "Beer",'
|
||||
' "status_topic": "test_topic",'
|
||||
' "state_topic": "test_topic",'
|
||||
' "command_topic": "test_topic" }'
|
||||
)
|
||||
|
||||
|
@ -421,12 +421,12 @@ async def test_discovery_update_switch(hass, mqtt_mock, caplog):
|
|||
|
||||
data1 = (
|
||||
'{ "name": "Beer",'
|
||||
' "status_topic": "test_topic",'
|
||||
' "state_topic": "test_topic",'
|
||||
' "command_topic": "test_topic" }'
|
||||
)
|
||||
data2 = (
|
||||
'{ "name": "Milk",'
|
||||
' "status_topic": "test_topic",'
|
||||
' "state_topic": "test_topic",'
|
||||
' "command_topic": "test_topic" }'
|
||||
)
|
||||
|
||||
|
@ -460,7 +460,7 @@ async def test_discovery_broken(hass, mqtt_mock, caplog):
|
|||
)
|
||||
data2 = (
|
||||
'{ "name": "Milk",'
|
||||
' "status_topic": "test_topic",'
|
||||
' "state_topic": "test_topic",'
|
||||
' "command_topic": "test_topic" }'
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue