File tree 2 files changed +7
-0
lines changed
homeassistant/components/reolink
2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -178,8 +178,13 @@ def __init__(
178
178
else :
179
179
self ._dev_id = f"{ self ._host .unique_id } _ch{ dev_ch } "
180
180
181
+ connections = set ()
182
+ if mac := self ._host .api .baichuan .mac_address (dev_ch ):
183
+ connections .add ((CONNECTION_NETWORK_MAC , mac ))
184
+
181
185
self ._attr_device_info = DeviceInfo (
182
186
identifiers = {(DOMAIN , self ._dev_id )},
187
+ connections = connections ,
183
188
via_device = (DOMAIN , self ._host .unique_id ),
184
189
name = self ._host .api .camera_name (dev_ch ),
185
190
model = self ._host .api .camera_model (dev_ch ),
Original file line number Diff line number Diff line change 35
35
TEST_PASSWORD2 = "new_password"
36
36
TEST_MAC = "aa:bb:cc:dd:ee:ff"
37
37
TEST_MAC2 = "ff:ee:dd:cc:bb:aa"
38
+ TEST_MAC_CAM = "11:22:33:44:55:66"
38
39
DHCP_FORMATTED_MAC = "aabbccddeeff"
39
40
TEST_UID = "ABC1234567D89EFG"
40
41
TEST_UID_CAM = "DEF7654321D89GHT"
@@ -142,6 +143,7 @@ def reolink_connect_class() -> Generator[MagicMock]:
142
143
# Disable tcp push by default for tests
143
144
host_mock .baichuan .port = TEST_BC_PORT
144
145
host_mock .baichuan .events_active = False
146
+ host_mock .baichuan .mac_address .return_value = TEST_MAC_CAM
145
147
host_mock .baichuan .privacy_mode .return_value = False
146
148
host_mock .baichuan .day_night_state .return_value = "day"
147
149
host_mock .baichuan .subscribe_events .side_effect = ReolinkError ("Test error" )
You can’t perform that action at this time.
0 commit comments