diff --git a/custom_components/bang_olufsen/binary_sensor.py b/custom_components/bang_olufsen/binary_sensor.py index 853c3fd..6f19250 100644 --- a/custom_components/bang_olufsen/binary_sensor.py +++ b/custom_components/bang_olufsen/binary_sensor.py @@ -49,7 +49,6 @@ def __init__(self, config_entry: BangOlufsenConfigEntry) -> None: class BangOlufsenBinarySensorBatteryCharging(BangOlufsenBinarySensor): """Battery charging Binary Sensor.""" - _attr_icon = "mdi:battery-charging" _attr_translation_key = "battery_charging" def __init__(self, config_entry: BangOlufsenConfigEntry) -> None: diff --git a/custom_components/bang_olufsen/const.py b/custom_components/bang_olufsen/const.py index 85b5817..c506d25 100644 --- a/custom_components/bang_olufsen/const.py +++ b/custom_components/bang_olufsen/const.py @@ -21,6 +21,7 @@ class BangOlufsenSource: SPDIF: Final[Source] = Source(name="Optical", id="spdif") UNKNOWN: Final[Source] = Source(name="Unknown Source", id="unknown") URI_STREAMER: Final[Source] = Source(name="Audio Streamer", id="uriStreamer") + USB_IN: Final[Source] = Source(name="USB", id="usbIn") BANG_OLUFSEN_STATES: dict[str, MediaPlayerState] = { diff --git a/custom_components/bang_olufsen/event.py b/custom_components/bang_olufsen/event.py index 73d489f..2368ace 100644 --- a/custom_components/bang_olufsen/event.py +++ b/custom_components/bang_olufsen/event.py @@ -102,7 +102,6 @@ class BangOlufsenButtonEvent(BangOlufsenEvent): _attr_device_class = EventDeviceClass.BUTTON _attr_event_types = DEVICE_BUTTON_EVENTS - _attr_icon = "mdi:gesture-tap-button" def __init__(self, config_entry: BangOlufsenConfigEntry, button_type: str) -> None: """Initialize Button.""" @@ -138,7 +137,6 @@ class BangOlufsenRemoteKeyEvent(BangOlufsenEvent): _attr_device_class = EventDeviceClass.BUTTON _attr_event_types = BEO_REMOTE_KEY_EVENTS - _attr_icon = "mdi:remote" def __init__( self, @@ -183,7 +181,6 @@ class BangOlufsenEventProximity(BangOlufsenEvent): _attr_device_class = EventDeviceClass.MOTION _attr_event_types = PROXIMITY_EVENTS - _attr_icon = "mdi:account-question" _attr_translation_key = "proximity" def __init__(self, config_entry: BangOlufsenConfigEntry) -> None: diff --git a/custom_components/bang_olufsen/icons.json b/custom_components/bang_olufsen/icons.json index 162b261..cb74247 100644 --- a/custom_components/bang_olufsen/icons.json +++ b/custom_components/bang_olufsen/icons.json @@ -1,13 +1,357 @@ { + "entity": { + "event": { + "bluetooth": { + "default": "mdi:gesture-tap-button" + }, + "control_blue": { + "default": "mdi:remote" + }, + "control_digit0": { + "default": "mdi:remote" + }, + "control_digit1": { + "default": "mdi:remote" + }, + "control_digit2": { + "default": "mdi:remote" + }, + "control_digit3": { + "default": "mdi:remote" + }, + "control_digit4": { + "default": "mdi:remote" + }, + "control_digit5": { + "default": "mdi:remote" + }, + "control_digit6": { + "default": "mdi:remote" + }, + "control_digit7": { + "default": "mdi:remote" + }, + "control_digit8": { + "default": "mdi:remote" + }, + "control_digit9": { + "default": "mdi:remote" + }, + "control_down": { + "default": "mdi:remote" + }, + "control_func1": { + "default": "mdi:remote" + }, + "control_func10": { + "default": "mdi:remote" + }, + "control_func11": { + "default": "mdi:remote" + }, + "control_func12": { + "default": "mdi:remote" + }, + "control_func13": { + "default": "mdi:remote" + }, + "control_func14": { + "default": "mdi:remote" + }, + "control_func15": { + "default": "mdi:remote" + }, + "control_func16": { + "default": "mdi:remote" + }, + "control_func17": { + "default": "mdi:remote" + }, + "control_func18": { + "default": "mdi:remote" + }, + "control_func19": { + "default": "mdi:remote" + }, + "control_func2": { + "default": "mdi:remote" + }, + "control_func20": { + "default": "mdi:remote" + }, + "control_func21": { + "default": "mdi:remote" + }, + "control_func22": { + "default": "mdi:remote" + }, + "control_func23": { + "default": "mdi:remote" + }, + "control_func24": { + "default": "mdi:remote" + }, + "control_func25": { + "default": "mdi:remote" + }, + "control_func26": { + "default": "mdi:remote" + }, + "control_func27": { + "default": "mdi:remote" + }, + "control_func3": { + "default": "mdi:remote" + }, + "control_func4": { + "default": "mdi:remote" + }, + "control_func5": { + "default": "mdi:remote" + }, + "control_func6": { + "default": "mdi:remote" + }, + "control_func7": { + "default": "mdi:remote" + }, + "control_func8": { + "default": "mdi:remote" + }, + "control_func9": { + "default": "mdi:remote" + }, + "control_green": { + "default": "mdi:remote" + }, + "control_left": { + "default": "mdi:remote" + }, + "control_play": { + "default": "mdi:remote" + }, + "control_red": { + "default": "mdi:remote" + }, + "control_rewind": { + "default": "mdi:remote" + }, + "control_right": { + "default": "mdi:remote" + }, + "control_select": { + "default": "mdi:remote" + }, + "control_stop": { + "default": "mdi:remote" + }, + "control_up": { + "default": "mdi:remote" + }, + "control_wind": { + "default": "mdi:remote" + }, + "control_yellow": { + "default": "mdi:remote" + }, + "light_blue": { + "default": "mdi:remote" + }, + "light_digit0": { + "default": "mdi:remote" + }, + "light_digit1": { + "default": "mdi:remote" + }, + "light_digit2": { + "default": "mdi:remote" + }, + "light_digit3": { + "default": "mdi:remote" + }, + "light_digit4": { + "default": "mdi:remote" + }, + "light_digit5": { + "default": "mdi:remote" + }, + "light_digit6": { + "default": "mdi:remote" + }, + "light_digit7": { + "default": "mdi:remote" + }, + "light_digit8": { + "default": "mdi:remote" + }, + "light_digit9": { + "default": "mdi:remote" + }, + "light_down": { + "default": "mdi:remote" + }, + "light_func1": { + "default": "mdi:remote" + }, + "light_func10": { + "default": "mdi:remote" + }, + "light_func11": { + "default": "mdi:remote" + }, + "light_func12": { + "default": "mdi:remote" + }, + "light_func13": { + "default": "mdi:remote" + }, + "light_func14": { + "default": "mdi:remote" + }, + "light_func15": { + "default": "mdi:remote" + }, + "light_func16": { + "default": "mdi:remote" + }, + "light_func17": { + "default": "mdi:remote" + }, + "light_func2": { + "default": "mdi:remote" + }, + "light_func3": { + "default": "mdi:remote" + }, + "light_func4": { + "default": "mdi:remote" + }, + "light_func5": { + "default": "mdi:remote" + }, + "light_func6": { + "default": "mdi:remote" + }, + "light_func7": { + "default": "mdi:remote" + }, + "light_func8": { + "default": "mdi:remote" + }, + "light_func9": { + "default": "mdi:remote" + }, + "light_green": { + "default": "mdi:remote" + }, + "light_left": { + "default": "mdi:remote" + }, + "light_play": { + "default": "mdi:remote" + }, + "light_red": { + "default": "mdi:remote" + }, + "light_rewind": { + "default": "mdi:remote" + }, + "light_right": { + "default": "mdi:remote" + }, + "light_select": { + "default": "mdi:remote" + }, + "light_stop": { + "default": "mdi:remote" + }, + "light_up": { + "default": "mdi:remote" + }, + "light_wind": { + "default": "mdi:remote" + }, + "light_yellow": { + "default": "mdi:remote" + }, + "microphone": { + "default": "mdi:gesture-tap-button" + }, + "next": { + "default": "mdi:gesture-tap-button" + }, + "playpause": { + "default": "mdi:gesture-tap-button" + }, + "preset1": { + "default": "mdi:gesture-tap-button" + }, + "preset2": { + "default": "mdi:gesture-tap-button" + }, + "preset3": { + "default": "mdi:gesture-tap-button" + }, + "preset4": { + "default": "mdi:gesture-tap-button" + }, + "previous": { + "default": "mdi:gesture-tap-button" + }, + "volume": { + "default": "mdi:gesture-tap-button" + } + }, + "select": { + "listening_position": { + "default": "mdi:sine-wave" + } + }, + "sensor": { + "battery_charging_time": { + "default": "mdi:battery-arrow-up" + }, + "battery_playing_time": { + "default": "mdi:battery-arrow-down" + }, + "home_control_uri": { + "default": "mdi:link-variant" + }, + "input_signal": { + "default": "mdi:audio-input-stereo-minijack" + }, + "media_id": { + "default": "mdi:information" + } + } + }, "services": { - "beolink_allstandby": { "service": "mdi:close-circle-multiple-outline" }, - "beolink_expand": { "service": "mdi:location-enter" }, - "beolink_join": { "service": "mdi:location-enter" }, - "beolink_leader_command": { "service": "mdi:location-enter" }, - "beolink_leave": { "service": "mdi:close-circle-outline" }, - "beolink_set_relative_volume": { "service": "mdi:volume-plus" }, - "beolink_set_volume": { "service": "mdi:volume-equal" }, - "beolink_unexpand": { "service": "mdi:location-exit" }, - "reboot": { "service": "mdi:restart" } + "beolink_allstandby": { + "service": "mdi:close-circle-multiple-outline" + }, + "beolink_expand": { + "service": "mdi:location-enter" + }, + "beolink_join": { + "service": "mdi:location-enter" + }, + "beolink_leader_command": { + "service": "mdi:location-enter" + }, + "beolink_leave": { + "service": "mdi:close-circle-outline" + }, + "beolink_set_relative_volume": { + "service": "mdi:volume-plus" + }, + "beolink_set_volume": { + "service": "mdi:volume-equal" + }, + "beolink_unexpand": { + "service": "mdi:location-exit" + }, + "reboot": { + "service": "mdi:restart" + } } } diff --git a/custom_components/bang_olufsen/manifest.json b/custom_components/bang_olufsen/manifest.json index acd50fe..4052174 100644 --- a/custom_components/bang_olufsen/manifest.json +++ b/custom_components/bang_olufsen/manifest.json @@ -9,6 +9,6 @@ "iot_class": "local_push", "issue_tracker": "https://github.com/bang-olufsen/bang_olufsen-hacs/issues", "requirements": ["mozart-api==4.1.1.116.0"], - "version": "3.0.0", + "version": "3.0.1", "zeroconf": ["_bangolufsen._tcp.local."] } diff --git a/custom_components/bang_olufsen/media_player.py b/custom_components/bang_olufsen/media_player.py index 15ed670..19d057a 100644 --- a/custom_components/bang_olufsen/media_player.py +++ b/custom_components/bang_olufsen/media_player.py @@ -226,7 +226,6 @@ class BangOlufsenMediaPlayer(MediaPlayerEntity, BangOlufsenEntity): """Representation of a media player.""" _attr_device_class = MediaPlayerDeviceClass.SPEAKER - _attr_icon = "mdi:speaker-wireless" _attr_name: None | str = None def __init__(self, config_entry: BangOlufsenConfigEntry) -> None: diff --git a/custom_components/bang_olufsen/select.py b/custom_components/bang_olufsen/select.py index 6fdfc9a..39c999d 100644 --- a/custom_components/bang_olufsen/select.py +++ b/custom_components/bang_olufsen/select.py @@ -57,7 +57,6 @@ def __init__(self, config_entry: BangOlufsenConfigEntry) -> None: class BangOlufsenSelectListeningPosition(BangOlufsenSelect): """Listening position Select.""" - _attr_icon = "mdi:sine-wave" _attr_translation_key = "listening_position" def __init__(self, config_entry: BangOlufsenConfigEntry) -> None: diff --git a/custom_components/bang_olufsen/sensor.py b/custom_components/bang_olufsen/sensor.py index 8046989..6a2c0ba 100644 --- a/custom_components/bang_olufsen/sensor.py +++ b/custom_components/bang_olufsen/sensor.py @@ -71,7 +71,6 @@ def __init__(self, config_entry: BangOlufsenConfigEntry) -> None: class BangOlufsenSensorBatteryLevel(BangOlufsenSensor): """Battery level Sensor.""" - _attr_icon = "mdi:battery" _attr_native_unit_of_measurement = "%" _attr_translation_key = "battery_level" @@ -108,7 +107,6 @@ async def _update_battery(self, data: BatteryState) -> None: class BangOlufsenSensorRemoteBatteryLevel(BangOlufsenSensor): """Battery level Sensor for the Beoremote One.""" - _attr_icon = "mdi:battery" _attr_native_unit_of_measurement = "%" _attr_translation_key = "remote_battery_level" _attr_should_poll = True @@ -142,7 +140,6 @@ class BangOlufsenSensorBatteryChargingTime(BangOlufsenSensor): """Battery charging time Sensor.""" _attr_entity_registry_enabled_default = False - _attr_icon = "mdi:battery-arrow-up" _attr_native_unit_of_measurement = "min" _attr_translation_key = "battery_charging_time" @@ -191,7 +188,6 @@ class BangOlufsenSensorBatteryPlayingTime(BangOlufsenSensor): """Battery playing time Sensor.""" _attr_entity_registry_enabled_default = False - _attr_icon = "mdi:battery-arrow-down" _attr_native_unit_of_measurement = "min" _attr_translation_key = "battery_playing_time" @@ -239,7 +235,6 @@ class BangOlufsenSensorMediaId(BangOlufsenSensor): _attr_entity_registry_enabled_default = False _attr_translation_key = "media_id" - _attr_icon = "mdi:information" def __init__(self, config_entry: BangOlufsenConfigEntry) -> None: """Init the media id Sensor.""" @@ -277,7 +272,6 @@ class BangOlufsenSensorInputSignal(BangOlufsenSensor): """Input signal Sensor.""" _attr_entity_registry_enabled_default = False - _attr_icon = "mdi:audio-input-stereo-minijack" _attr_translation_key = "input_signal" def __init__(self, config_entry: BangOlufsenConfigEntry) -> None: diff --git a/custom_components/bang_olufsen/text.py b/custom_components/bang_olufsen/text.py index 5706643..010fae5 100644 --- a/custom_components/bang_olufsen/text.py +++ b/custom_components/bang_olufsen/text.py @@ -46,7 +46,6 @@ class BangOlufsenTextHomeControlUri(BangOlufsenText): """Home Control URI Text.""" _attr_entity_registry_enabled_default = False - _attr_icon = "mdi:link-variant" _attr_translation_key = "home_control_uri" def __init__(self, config_entry: BangOlufsenConfigEntry) -> None: