Add missing entity category and icons for smlight integration (#154131)

This commit is contained in:
Paul Bottein
2025-10-10 21:30:32 +02:00
committed by Franck Nijhof
parent f93b9e0ed0
commit df35c535e4
3 changed files with 26 additions and 4 deletions
@@ -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"
}
}
}
}
+1 -1
View File
@@ -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,
@@ -60,7 +60,7 @@
'device_id': <ANY>,
'disabled_by': None,
'domain': 'switch',
'entity_category': None,
'entity_category': <EntityCategory.CONFIG: 'config'>,
'entity_id': 'switch.mock_title_disable_leds',
'has_entity_name': True,
'hidden_by': None,
@@ -109,7 +109,7 @@
'device_id': <ANY>,
'disabled_by': None,
'domain': 'switch',
'entity_category': None,
'entity_category': <EntityCategory.CONFIG: 'config'>,
'entity_id': 'switch.mock_title_led_night_mode',
'has_entity_name': True,
'hidden_by': None,
@@ -158,7 +158,7 @@
'device_id': <ANY>,
'disabled_by': None,
'domain': 'switch',
'entity_category': None,
'entity_category': <EntityCategory.CONFIG: 'config'>,
'entity_id': 'switch.mock_title_vpn_enabled',
'has_entity_name': True,
'hidden_by': None,