mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Set entities to config category in SmartThings (#143669)
This commit is contained in:
parent
6a115d0133
commit
765a95c273
@ -5,6 +5,7 @@ from __future__ import annotations
|
||||
from pysmartthings import Attribute, Capability, Command, SmartThings
|
||||
|
||||
from homeassistant.components.number import NumberEntity, NumberMode
|
||||
from homeassistant.const import EntityCategory
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
|
||||
|
||||
@ -33,6 +34,7 @@ class SmartThingsWasherRinseCyclesNumberEntity(SmartThingsEntity, NumberEntity):
|
||||
_attr_translation_key = "washer_rinse_cycles"
|
||||
_attr_native_step = 1.0
|
||||
_attr_mode = NumberMode.BOX
|
||||
_attr_entity_category = EntityCategory.CONFIG
|
||||
|
||||
def __init__(self, client: SmartThings, device: FullDevice) -> None:
|
||||
"""Initialize the instance."""
|
||||
|
@ -12,6 +12,7 @@ from homeassistant.components.switch import (
|
||||
SwitchEntity,
|
||||
SwitchEntityDescription,
|
||||
)
|
||||
from homeassistant.const import EntityCategory
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers import entity_registry as er
|
||||
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
|
||||
@ -69,6 +70,7 @@ CAPABILITY_TO_COMMAND_SWITCHES: dict[
|
||||
translation_key="wrinkle_prevent",
|
||||
status_attribute=Attribute.DRYER_WRINKLE_PREVENT,
|
||||
command=Command.SET_DRYER_WRINKLE_PREVENT,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
)
|
||||
}
|
||||
CAPABILITY_TO_SWITCHES: dict[Capability | str, SmartThingsSwitchEntityDescription] = {
|
||||
@ -76,6 +78,7 @@ CAPABILITY_TO_SWITCHES: dict[Capability | str, SmartThingsSwitchEntityDescriptio
|
||||
key=Capability.SAMSUNG_CE_WASHER_BUBBLE_SOAK,
|
||||
translation_key="bubble_soak",
|
||||
status_attribute=Attribute.STATUS,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
Capability.SWITCH: SmartThingsSwitchEntityDescription(
|
||||
key=Capability.SWITCH,
|
||||
|
@ -16,7 +16,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'number',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'number.washer_rinse_cycles',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@ -73,7 +73,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'number',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'number.washing_machine_rinse_cycles',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
|
@ -246,7 +246,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'switch',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'switch.dryer_wrinkle_prevent',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@ -293,7 +293,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'switch',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'switch.seca_roupa_wrinkle_prevent',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@ -340,7 +340,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'switch',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'switch.washing_machine_bubble_soak',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
|
Loading…
x
Reference in New Issue
Block a user