mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Lametric add configuration url (#147118)
* Set cofiguration URL to LaMetric device web interface * Update LaMetric unit tests to accomodate fro configuration url
This commit is contained in:
parent
2a97b128c3
commit
b2520394f4
@ -31,4 +31,5 @@ class LaMetricEntity(CoordinatorEntity[LaMetricDataUpdateCoordinator]):
|
||||
name=coordinator.data.name,
|
||||
sw_version=coordinator.data.os_version,
|
||||
serial_number=coordinator.data.serial_number,
|
||||
configuration_url=f"https://{coordinator.data.wifi.ip}/",
|
||||
)
|
||||
|
@ -42,7 +42,7 @@ async def test_button_app_next(
|
||||
assert entry.device_id
|
||||
device_entry = device_registry.async_get(entry.device_id)
|
||||
assert device_entry
|
||||
assert device_entry.configuration_url is None
|
||||
assert device_entry.configuration_url == "https://127.0.0.1/"
|
||||
assert device_entry.connections == {
|
||||
(dr.CONNECTION_NETWORK_MAC, "aa:bb:cc:dd:ee:ff")
|
||||
}
|
||||
@ -89,7 +89,7 @@ async def test_button_app_previous(
|
||||
assert entry.device_id
|
||||
device_entry = device_registry.async_get(entry.device_id)
|
||||
assert device_entry
|
||||
assert device_entry.configuration_url is None
|
||||
assert device_entry.configuration_url == "https://127.0.0.1/"
|
||||
assert device_entry.connections == {
|
||||
(dr.CONNECTION_NETWORK_MAC, "aa:bb:cc:dd:ee:ff")
|
||||
}
|
||||
@ -137,7 +137,7 @@ async def test_button_dismiss_current_notification(
|
||||
assert entry.device_id
|
||||
device_entry = device_registry.async_get(entry.device_id)
|
||||
assert device_entry
|
||||
assert device_entry.configuration_url is None
|
||||
assert device_entry.configuration_url == "https://127.0.0.1/"
|
||||
assert device_entry.connections == {
|
||||
(dr.CONNECTION_NETWORK_MAC, "aa:bb:cc:dd:ee:ff")
|
||||
}
|
||||
@ -185,7 +185,7 @@ async def test_button_dismiss_all_notifications(
|
||||
assert entry.device_id
|
||||
device_entry = device_registry.async_get(entry.device_id)
|
||||
assert device_entry
|
||||
assert device_entry.configuration_url is None
|
||||
assert device_entry.configuration_url == "https://127.0.0.1/"
|
||||
assert device_entry.connections == {
|
||||
(dr.CONNECTION_NETWORK_MAC, "aa:bb:cc:dd:ee:ff")
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ async def test_brightness(
|
||||
|
||||
device = device_registry.async_get(entry.device_id)
|
||||
assert device
|
||||
assert device.configuration_url is None
|
||||
assert device.configuration_url == "https://127.0.0.1/"
|
||||
assert device.connections == {(dr.CONNECTION_NETWORK_MAC, "aa:bb:cc:dd:ee:ff")}
|
||||
assert device.entry_type is None
|
||||
assert device.hw_version is None
|
||||
@ -104,7 +104,7 @@ async def test_volume(
|
||||
|
||||
device = device_registry.async_get(entry.device_id)
|
||||
assert device
|
||||
assert device.configuration_url is None
|
||||
assert device.configuration_url == "https://127.0.0.1/"
|
||||
assert device.connections == {(dr.CONNECTION_NETWORK_MAC, "aa:bb:cc:dd:ee:ff")}
|
||||
assert device.entry_type is None
|
||||
assert device.hw_version is None
|
||||
|
@ -48,7 +48,7 @@ async def test_brightness_mode(
|
||||
|
||||
device = device_registry.async_get(entry.device_id)
|
||||
assert device
|
||||
assert device.configuration_url is None
|
||||
assert device.configuration_url == "https://127.0.0.1/"
|
||||
assert device.connections == {(dr.CONNECTION_NETWORK_MAC, "aa:bb:cc:dd:ee:ff")}
|
||||
assert device.entry_type is None
|
||||
assert device.hw_version is None
|
||||
|
@ -41,7 +41,7 @@ async def test_wifi_signal(
|
||||
|
||||
device = device_registry.async_get(entry.device_id)
|
||||
assert device
|
||||
assert device.configuration_url is None
|
||||
assert device.configuration_url == "https://127.0.0.1/"
|
||||
assert device.connections == {(dr.CONNECTION_NETWORK_MAC, "aa:bb:cc:dd:ee:ff")}
|
||||
assert device.entry_type is None
|
||||
assert device.hw_version is None
|
||||
|
@ -50,7 +50,7 @@ async def test_bluetooth(
|
||||
|
||||
device = device_registry.async_get(entry.device_id)
|
||||
assert device
|
||||
assert device.configuration_url is None
|
||||
assert device.configuration_url == "https://127.0.0.1/"
|
||||
assert device.connections == {(dr.CONNECTION_NETWORK_MAC, "aa:bb:cc:dd:ee:ff")}
|
||||
assert device.entry_type is None
|
||||
assert device.hw_version is None
|
||||
|
Loading…
x
Reference in New Issue
Block a user