feat: add entity_category for indicator-light

This commit is contained in:
Necroneco
2025-01-23 21:16:58 +08:00
parent 2e60962e94
commit e9dbaaeb07
3 changed files with 24 additions and 2 deletions

View File

@ -51,6 +51,7 @@ from homeassistant.components.event import EventDeviceClass
from homeassistant.const import (
CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
EntityCategory,
LIGHT_LUX,
UnitOfEnergy,
UnitOfPower,
@ -264,7 +265,8 @@ SPEC_DEVICE_TRANS_MAP: dict = {
'events': set<event instance name: str>,
'actions': set<action instance name: str>
},
'entity': str
'entity': str,
'entity_category'?: str,
}
}
"""
@ -282,10 +284,23 @@ SPEC_SERVICE_TRANS_MAP: dict = {
},
'entity': 'light'
},
'indicator-light': 'light',
'ambient-light': 'light',
'night-light': 'light',
'white-light': 'light',
'indicator-light': {
'required': {
'properties': {
'on': {'read', 'write'}
}
},
'optional': {
'properties': {
'mode', 'brightness',
}
},
'entity': 'light',
'entity_category': EntityCategory.CONFIG,
},
'fan': {
'required': {
'properties': {