Skip to content

Commit

Permalink
Fix ConfigEntry stragglers
Browse files Browse the repository at this point in the history
  • Loading branch information
mj23000 committed Oct 28, 2024
1 parent ae1b8f3 commit 41332cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 3 additions & 4 deletions custom_components/bang_olufsen/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from mozart_api.models import PairedRemote

from homeassistant.components.event import EventDeviceClass, EventEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_MODEL
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.device_registry import DeviceInfo
Expand Down Expand Up @@ -105,7 +104,7 @@ class BangOlufsenButtonEvent(BangOlufsenEvent):
_attr_event_types = DEVICE_BUTTON_EVENTS
_attr_icon = "mdi:gesture-tap-button"

def __init__(self, config_entry: ConfigEntry, button_type: str) -> None:
def __init__(self, config_entry: BangOlufsenConfigEntry, button_type: str) -> None:
"""Initialize Button."""
super().__init__(config_entry)

Expand Down Expand Up @@ -143,7 +142,7 @@ class BangOlufsenRemoteKeyEvent(BangOlufsenEvent):

def __init__(
self,
config_entry: ConfigEntry,
config_entry: BangOlufsenConfigEntry,
remote: PairedRemote,
key_type: str,
) -> None:
Expand Down Expand Up @@ -187,7 +186,7 @@ class BangOlufsenEventProximity(BangOlufsenEvent):
_attr_icon = "mdi:account-question"
_attr_translation_key = "proximity"

def __init__(self, config_entry: ConfigEntry) -> None:
def __init__(self, config_entry: BangOlufsenConfigEntry) -> None:
"""Init the proximity event."""
super().__init__(config_entry)

Expand Down
3 changes: 1 addition & 2 deletions custom_components/bang_olufsen/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
RepeatMode,
async_process_play_media_url,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_MODEL, Platform
from homeassistant.core import (
HomeAssistant,
Expand Down Expand Up @@ -233,7 +232,7 @@ class BangOlufsenMediaPlayer(MediaPlayerEntity, BangOlufsenEntity):
_attr_icon = "mdi:speaker-wireless"
_attr_name: None | str = None

def __init__(self, config_entry: ConfigEntry) -> None:
def __init__(self, config_entry: BangOlufsenConfigEntry) -> None:
"""Initialize the media player."""
super().__init__(config_entry)
self._attr_should_poll = True
Expand Down

0 comments on commit 41332cc

Please sign in to comment.