Add service configuration URL to MQTT (#57731)
This commit is contained in:
parent
e34fb4cfb9
commit
eed9f67402
4 changed files with 24 additions and 0 deletions
|
@ -301,6 +301,7 @@ def test_entity_device_info_schema():
|
|||
"name": "Beer",
|
||||
"model": "Glass",
|
||||
"sw_version": "0.1-beta",
|
||||
"configuration_url": "http://example.com",
|
||||
}
|
||||
)
|
||||
# full device info with via_device
|
||||
|
@ -316,6 +317,7 @@ def test_entity_device_info_schema():
|
|||
"model": "Glass",
|
||||
"sw_version": "0.1-beta",
|
||||
"via_device": "test-hub",
|
||||
"configuration_url": "http://example.com",
|
||||
}
|
||||
)
|
||||
# no identifiers
|
||||
|
@ -334,6 +336,18 @@ def test_entity_device_info_schema():
|
|||
{"identifiers": [], "connections": [], "name": "Beer"}
|
||||
)
|
||||
|
||||
# not an valid URL
|
||||
with pytest.raises(vol.Invalid):
|
||||
MQTT_ENTITY_DEVICE_INFO_SCHEMA(
|
||||
{
|
||||
"manufacturer": "Whatever",
|
||||
"name": "Beer",
|
||||
"model": "Glass",
|
||||
"sw_version": "0.1-beta",
|
||||
"configuration_url": "fake://link",
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
async def test_receiving_non_utf8_message_gets_logged(
|
||||
hass, mqtt_mock, calls, record_calls, caplog
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue