Skip to content

Commit 11d2d4b

Browse files
committed
Improve
1 parent 53a57a7 commit 11d2d4b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

custom_components/plugwise_usb/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,9 @@ async def async_node_discovered(node_event: NodeEvent, mac: str) -> None:
114114

115115
async def device_add(call: ServiceCall) -> bool:
116116
"""Manually add device to Plugwise zigbee network."""
117+
mac = call.data[ATTR_MAC_ADDRESS]
117118
try:
118-
result = await api_stick.register_node(call.data[ATTR_MAC_ADDRESS])
119+
result = await api_stick.register_node(mac)
119120
except NodeError as exc:
120121
raise HomeAssistantError(f"Failed to add device with {mac}: {exc}")
121122
return result

0 commit comments

Comments
 (0)