Skip to content

Commit

Permalink
fix: fix instance_id deprecation (#2249)
Browse files Browse the repository at this point in the history
  • Loading branch information
Petro31 committed May 6, 2024
1 parent 1c638a2 commit fc75879
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/alexa_media/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from homeassistant.const import CONF_EMAIL, CONF_URL
from homeassistant.exceptions import ConditionErrorMessage
from homeassistant.helpers.entity_component import EntityComponent
from homeassistant.helpers.instance_id import async_get as async_get_instance_id
import wrapt

from .const import DATA_ALEXAMEDIA, EXCEPTION_TEMPLATE
Expand Down Expand Up @@ -271,7 +272,7 @@ async def calculate_uuid(hass, email: str, url: str) -> dict:
if entry.data.get(CONF_EMAIL) == email and entry.data.get(CONF_URL) == url:
return_index = index
break
uuid = await hass.helpers.instance_id.async_get()
uuid = await async_get_instance_id(hass)
result["uuid"] = hex(
int(uuid, 16)
# increment uuid for second accounts
Expand Down

0 comments on commit fc75879

Please sign in to comment.