Skip to content

Commit bc6accf

Browse files
authored
Add missing entity category and icons for smlight integration (home-assistant#154131)
1 parent d40eeee commit bc6accf

File tree

3 files changed

+26
-4
lines changed

3 files changed

+26
-4
lines changed

homeassistant/components/smlight/icons.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,28 @@
1010
"zigbee_type": {
1111
"default": "mdi:zigbee"
1212
}
13+
},
14+
"switch": {
15+
"disable_led": {
16+
"default": "mdi:led-off"
17+
},
18+
"auto_zigbee_update": {
19+
"default": "mdi:autorenew"
20+
},
21+
"night_mode": {
22+
"default": "mdi:lightbulb-night"
23+
},
24+
"vpn_enabled": {
25+
"default": "mdi:shield-lock"
26+
}
27+
},
28+
"button": {
29+
"zigbee_flash_mode": {
30+
"default": "mdi:memory-arrow-down"
31+
},
32+
"reconnect_zigbee_router": {
33+
"default": "mdi:connection"
34+
}
1335
}
1436
}
1537
}

homeassistant/components/smlight/switch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ class SmSwitchEntityDescription(SwitchEntityDescription):
5151
SmSwitchEntityDescription(
5252
key="auto_zigbee_update",
5353
translation_key="auto_zigbee_update",
54-
entity_category=EntityCategory.CONFIG,
5554
setting=Settings.ZB_AUTOUPDATE,
5655
entity_registry_enabled_default=False,
5756
state_fn=lambda x: x.auto_zigbee,
@@ -83,6 +82,7 @@ class SmSwitch(SmEntity, SwitchEntity):
8382
coordinator: SmDataUpdateCoordinator
8483
entity_description: SmSwitchEntityDescription
8584
_attr_device_class = SwitchDeviceClass.SWITCH
85+
_attr_entity_category = EntityCategory.CONFIG
8686

8787
def __init__(
8888
self,

tests/components/smlight/snapshots/test_switch.ambr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
'device_id': <ANY>,
6161
'disabled_by': None,
6262
'domain': 'switch',
63-
'entity_category': None,
63+
'entity_category': <EntityCategory.CONFIG: 'config'>,
6464
'entity_id': 'switch.mock_title_disable_leds',
6565
'has_entity_name': True,
6666
'hidden_by': None,
@@ -109,7 +109,7 @@
109109
'device_id': <ANY>,
110110
'disabled_by': None,
111111
'domain': 'switch',
112-
'entity_category': None,
112+
'entity_category': <EntityCategory.CONFIG: 'config'>,
113113
'entity_id': 'switch.mock_title_led_night_mode',
114114
'has_entity_name': True,
115115
'hidden_by': None,
@@ -158,7 +158,7 @@
158158
'device_id': <ANY>,
159159
'disabled_by': None,
160160
'domain': 'switch',
161-
'entity_category': None,
161+
'entity_category': <EntityCategory.CONFIG: 'config'>,
162162
'entity_id': 'switch.mock_title_vpn_enabled',
163163
'has_entity_name': True,
164164
'hidden_by': None,

0 commit comments

Comments
 (0)