Skip to content

Commit

Permalink
B5r1oJ0A9G#63 Error while setting up teufel_raumfeld platform for med…
Browse files Browse the repository at this point in the history
…ia_player

Changes to avoid using "hass.helpers.entity_registry" - import entity_registry from homeassistant.helpers and directly use it
  • Loading branch information
klausw01 committed Jun 28, 2024
1 parent 8e0f9fb commit d2cd579
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions custom_components/teufel_raumfeld/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
from homeassistant.const import STATE_IDLE, STATE_OFF, STATE_PAUSED, STATE_PLAYING
from homeassistant.helpers import config_validation as cv
from homeassistant.helpers import entity_platform
from homeassistant.helpers import entity_registry
from homeassistant.util.dt import utcnow

from . import log_debug, log_error, log_fatal, log_info
Expand Down Expand Up @@ -148,9 +149,9 @@ async def async_setup_entry(hass, config_entry, async_add_devices):
raumfeld = hass.data[DOMAIN][config_entry.entry_id]
room_names = raumfeld.get_rooms()
room_groups = raumfeld.get_groups()
entity_registry = hass.helpers.entity_registry.async_get(hass)
entity_entries = hass.helpers.entity_registry.async_entries_for_config_entry(
entity_registry, config_entry.entry_id
registry = entity_registry.async_get(hass)
entity_entries = entity_registry.async_entries_for_config_entry(
registry, config_entry.entry_id
)
platform = entity_platform.current_platform.get()
devices = []
Expand Down

0 comments on commit d2cd579

Please sign in to comment.