From df35c535e42fd7eb44f10fc7828ba4d17ffab6bd Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Fri, 10 Oct 2025 21:30:32 +0200 Subject: [PATCH] Add missing entity category and icons for smlight integration (#154131) --- homeassistant/components/smlight/icons.json | 22 +++++++++++++++++++ homeassistant/components/smlight/switch.py | 2 +- .../smlight/snapshots/test_switch.ambr | 6 ++--- 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/smlight/icons.json b/homeassistant/components/smlight/icons.json index 3d086466b4f2..1afd7c71d676 100644 --- a/homeassistant/components/smlight/icons.json +++ b/homeassistant/components/smlight/icons.json @@ -10,6 +10,28 @@ "zigbee_type": { "default": "mdi:zigbee" } + }, + "switch": { + "disable_led": { + "default": "mdi:led-off" + }, + "auto_zigbee_update": { + "default": "mdi:autorenew" + }, + "night_mode": { + "default": "mdi:lightbulb-night" + }, + "vpn_enabled": { + "default": "mdi:shield-lock" + } + }, + "button": { + "zigbee_flash_mode": { + "default": "mdi:memory-arrow-down" + }, + "reconnect_zigbee_router": { + "default": "mdi:connection" + } } } } diff --git a/homeassistant/components/smlight/switch.py b/homeassistant/components/smlight/switch.py index 5cd187c009c4..17c4a0d7dcea 100644 --- a/homeassistant/components/smlight/switch.py +++ b/homeassistant/components/smlight/switch.py @@ -51,7 +51,6 @@ SWITCHES: list[SmSwitchEntityDescription] = [ SmSwitchEntityDescription( key="auto_zigbee_update", translation_key="auto_zigbee_update", - entity_category=EntityCategory.CONFIG, setting=Settings.ZB_AUTOUPDATE, entity_registry_enabled_default=False, state_fn=lambda x: x.auto_zigbee, @@ -83,6 +82,7 @@ class SmSwitch(SmEntity, SwitchEntity): coordinator: SmDataUpdateCoordinator entity_description: SmSwitchEntityDescription _attr_device_class = SwitchDeviceClass.SWITCH + _attr_entity_category = EntityCategory.CONFIG def __init__( self, diff --git a/tests/components/smlight/snapshots/test_switch.ambr b/tests/components/smlight/snapshots/test_switch.ambr index 85084c736093..01bd9d995064 100644 --- a/tests/components/smlight/snapshots/test_switch.ambr +++ b/tests/components/smlight/snapshots/test_switch.ambr @@ -60,7 +60,7 @@ 'device_id': , 'disabled_by': None, 'domain': 'switch', - 'entity_category': None, + 'entity_category': , 'entity_id': 'switch.mock_title_disable_leds', 'has_entity_name': True, 'hidden_by': None, @@ -109,7 +109,7 @@ 'device_id': , 'disabled_by': None, 'domain': 'switch', - 'entity_category': None, + 'entity_category': , 'entity_id': 'switch.mock_title_led_night_mode', 'has_entity_name': True, 'hidden_by': None, @@ -158,7 +158,7 @@ 'device_id': , 'disabled_by': None, 'domain': 'switch', - 'entity_category': None, + 'entity_category': , 'entity_id': 'switch.mock_title_vpn_enabled', 'has_entity_name': True, 'hidden_by': None,