44import logging
55from typing import Any , TypedDict
66
7- from homeassistant .const import ATTR_MAC_ADDRESS
87from homeassistant .core import HomeAssistant , ServiceCall , callback
8+ from homeassistant .components .device_tracker import ATTR_MAC
99from homeassistant .exceptions import ConfigEntryNotReady , HomeAssistantError
1010from homeassistant .helpers import device_registry as dr , entity_registry as er
1111from 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