mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Use device registry CONNECTION_* constants (#49923)
This commit is contained in:
@@ -245,12 +245,17 @@ def test_entity_device_info_schema():
|
||||
MQTT_ENTITY_DEVICE_INFO_SCHEMA({"identifiers": ["abcd"]})
|
||||
MQTT_ENTITY_DEVICE_INFO_SCHEMA({"identifiers": "abcd"})
|
||||
# just connection
|
||||
MQTT_ENTITY_DEVICE_INFO_SCHEMA({"connections": [["mac", "02:5b:26:a8:dc:12"]]})
|
||||
MQTT_ENTITY_DEVICE_INFO_SCHEMA(
|
||||
{"connections": [[dr.CONNECTION_NETWORK_MAC, "02:5b:26:a8:dc:12"]]}
|
||||
)
|
||||
# full device info
|
||||
MQTT_ENTITY_DEVICE_INFO_SCHEMA(
|
||||
{
|
||||
"identifiers": ["helloworld", "hello"],
|
||||
"connections": [["mac", "02:5b:26:a8:dc:12"], ["zigbee", "zigbee_id"]],
|
||||
"connections": [
|
||||
[dr.CONNECTION_NETWORK_MAC, "02:5b:26:a8:dc:12"],
|
||||
[dr.CONNECTION_ZIGBEE, "zigbee_id"],
|
||||
],
|
||||
"manufacturer": "Whatever",
|
||||
"name": "Beer",
|
||||
"model": "Glass",
|
||||
@@ -261,7 +266,10 @@ def test_entity_device_info_schema():
|
||||
MQTT_ENTITY_DEVICE_INFO_SCHEMA(
|
||||
{
|
||||
"identifiers": ["helloworld", "hello"],
|
||||
"connections": [["mac", "02:5b:26:a8:dc:12"], ["zigbee", "zigbee_id"]],
|
||||
"connections": [
|
||||
[dr.CONNECTION_NETWORK_MAC, "02:5b:26:a8:dc:12"],
|
||||
[dr.CONNECTION_ZIGBEE, "zigbee_id"],
|
||||
],
|
||||
"manufacturer": "Whatever",
|
||||
"name": "Beer",
|
||||
"model": "Glass",
|
||||
|
||||
Reference in New Issue
Block a user