Skip to content

Commit e463ab7

Browse files
committed
Fix ATTR_MAC import
1 parent e6aad2d commit e463ab7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

custom_components/plugwise_usb/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
import logging
55
from typing import Any, TypedDict
66

7-
from homeassistant.const import ATTR_MAC_ADDRESS
87
from homeassistant.core import HomeAssistant, ServiceCall, callback
8+
from homeassistant.components.device_tracker import ATTR_MAC
99
from homeassistant.exceptions import ConfigEntryNotReady, HomeAssistantError
1010
from homeassistant.helpers import device_registry as dr, entity_registry as er
1111
from homeassistant.helpers.storage import STORAGE_DIR
@@ -130,7 +130,7 @@ async def enable_auto_joining(call: ServiceCall) -> bool:
130130

131131
async def enable_production(call: ServiceCall) -> bool:
132132
"""Enable production-measurement for a Node."""
133-
mac = call.data[ATTR_MAC_ADDRESS]
133+
mac = call.data[ATTR_MAC]
134134
try:
135135
result = await api_stick.set_measure_interval(mac, 60, 60)
136136
except (NodeError, StickError) as exc:
@@ -139,7 +139,7 @@ async def enable_production(call: ServiceCall) -> bool:
139139

140140
async def disable_production(call: ServiceCall) -> bool:
141141
"""Disable production-measurement for a Node."""
142-
mac = call.data[ATTR_MAC_ADDRESS]
142+
mac = call.data[ATTR_MAC]
143143
try:
144144
result = await api_stick.set_measure_interval(mac, 60, 0)
145145
except (NodeError, StickError) as exc:

0 commit comments

Comments
 (0)