mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Move Auto On/off switches to Config EntityCategory (#120648)
This commit is contained in:
parent
5634741ce2
commit
85629dc31e
@ -9,6 +9,7 @@ from lmcloud.lm_machine import LaMarzoccoMachine
|
||||
from lmcloud.models import LaMarzoccoMachineConfig
|
||||
|
||||
from homeassistant.components.switch import SwitchEntity, SwitchEntityDescription
|
||||
from homeassistant.const import EntityCategory
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
||||
@ -105,6 +106,7 @@ class LaMarzoccoAutoOnOffSwitchEntity(LaMarzoccoBaseEntity, SwitchEntity):
|
||||
super().__init__(coordinator, f"auto_on_off_{identifier}")
|
||||
self._identifier = identifier
|
||||
self._attr_translation_placeholders = {"id": identifier}
|
||||
self.entity_category = EntityCategory.CONFIG
|
||||
|
||||
async def _async_enable(self, state: bool) -> None:
|
||||
"""Enable or disable the auto on/off schedule."""
|
||||
|
@ -10,7 +10,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'switch',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'switch.gs01234_auto_on_off_os2oswx',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@ -43,7 +43,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'switch',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'switch.gs01234_auto_on_off_axfz5bj',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
|
Loading…
x
Reference in New Issue
Block a user