From 76784cbc957814efcf6761adc11cedcbb8e6dc4e Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Sun, 25 Feb 2024 10:44:49 +0100 Subject: [PATCH] Add icon translations to Blink (#111346) --- .../components/blink/alarm_control_panel.py | 3 --- homeassistant/components/blink/icons.json | 21 +++++++++++++++++++ homeassistant/components/blink/sensor.py | 1 - homeassistant/components/blink/switch.py | 1 - 4 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 homeassistant/components/blink/icons.json diff --git a/homeassistant/components/blink/alarm_control_panel.py b/homeassistant/components/blink/alarm_control_panel.py index f3e3d97fc5d..f2c01de4f18 100644 --- a/homeassistant/components/blink/alarm_control_panel.py +++ b/homeassistant/components/blink/alarm_control_panel.py @@ -26,8 +26,6 @@ from .coordinator import BlinkUpdateCoordinator _LOGGER = logging.getLogger(__name__) -ICON = "mdi:security" - async def async_setup_entry( hass: HomeAssistant, config: ConfigEntry, async_add_entities: AddEntitiesCallback @@ -46,7 +44,6 @@ class BlinkSyncModuleHA( ): """Representation of a Blink Alarm Control Panel.""" - _attr_icon = ICON _attr_supported_features = AlarmControlPanelEntityFeature.ARM_AWAY _attr_has_entity_name = True _attr_name = None diff --git a/homeassistant/components/blink/icons.json b/homeassistant/components/blink/icons.json new file mode 100644 index 00000000000..cd8a282737f --- /dev/null +++ b/homeassistant/components/blink/icons.json @@ -0,0 +1,21 @@ +{ + "entity": { + "sensor": { + "wifi_strength": { + "default": "mdi:wifi" + } + }, + "switch": { + "camera_motion": { + "default": "mdi:motion-sensor" + } + } + }, + "services": { + "blink_update": "mdi:update", + "trigger_camera": "mdi:image-refresh", + "save_video": "mdi:file-video", + "save_recent_clips": "mdi:file-video", + "send_pin": "mdi:two-factor-authentication" + } +} diff --git a/homeassistant/components/blink/sensor.py b/homeassistant/components/blink/sensor.py index ea31d1b29ab..fb429e79dc8 100644 --- a/homeassistant/components/blink/sensor.py +++ b/homeassistant/components/blink/sensor.py @@ -32,7 +32,6 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = ( SensorEntityDescription( key=TYPE_WIFI_STRENGTH, translation_key="wifi_strength", - icon="mdi:wifi", entity_category=EntityCategory.DIAGNOSTIC, state_class=SensorStateClass.MEASUREMENT, ), diff --git a/homeassistant/components/blink/switch.py b/homeassistant/components/blink/switch.py index 0a066850d5f..2b25d1bce0c 100644 --- a/homeassistant/components/blink/switch.py +++ b/homeassistant/components/blink/switch.py @@ -21,7 +21,6 @@ from .coordinator import BlinkUpdateCoordinator SWITCH_TYPES: tuple[SwitchEntityDescription, ...] = ( SwitchEntityDescription( key=TYPE_CAMERA_ARMED, - icon="mdi:motion-sensor", translation_key="camera_motion", device_class=SwitchDeviceClass.SWITCH, ),