Migrate HomeKit Controller translations (#83304)
parent
226a880645
commit
32dfc59d9e
|
@ -1,6 +1,5 @@
|
|||
"""Constants for the homekit_controller component."""
|
||||
import asyncio
|
||||
from typing import Final
|
||||
|
||||
from aiohomekit.exceptions import (
|
||||
AccessoryDisconnectedError,
|
||||
|
@ -97,10 +96,6 @@ CHARACTERISTIC_PLATFORMS = {
|
|||
CharacteristicsTypes.THREAD_NODE_CAPABILITIES: "sensor",
|
||||
}
|
||||
|
||||
|
||||
# Device classes
|
||||
DEVICE_CLASS_ECOBEE_MODE: Final = "homekit_controller__ecobee_mode"
|
||||
|
||||
STARTUP_EXCEPTIONS = (
|
||||
asyncio.TimeoutError,
|
||||
AccessoryNotFoundError,
|
||||
|
|
|
@ -11,7 +11,6 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
|||
|
||||
from . import KNOWN_DEVICES
|
||||
from .connection import HKDevice
|
||||
from .const import DEVICE_CLASS_ECOBEE_MODE
|
||||
from .entity import CharacteristicEntity
|
||||
|
||||
_ECOBEE_MODE_TO_TEXT = {
|
||||
|
@ -26,7 +25,7 @@ class EcobeeModeSelect(CharacteristicEntity, SelectEntity):
|
|||
"""Represents a ecobee mode select entity."""
|
||||
|
||||
_attr_options = ["home", "sleep", "away"]
|
||||
_attr_device_class = DEVICE_CLASS_ECOBEE_MODE
|
||||
_attr_translation_key = "ecobee_mode"
|
||||
|
||||
@property
|
||||
def name(self) -> str:
|
||||
|
|
|
@ -71,6 +71,15 @@
|
|||
}
|
||||
},
|
||||
"entity": {
|
||||
"select": {
|
||||
"ecobee_mode": {
|
||||
"state": {
|
||||
"away": "Away",
|
||||
"home": "Home",
|
||||
"sleep": "Sleep"
|
||||
}
|
||||
}
|
||||
},
|
||||
"sensor": {
|
||||
"thread_node_capabilities": {
|
||||
"state": {
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"state": {
|
||||
"homekit_controller__ecobee_mode": {
|
||||
"home": "Home",
|
||||
"sleep": "Sleep",
|
||||
"away": "Away"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -70,6 +70,15 @@
|
|||
}
|
||||
},
|
||||
"entity": {
|
||||
"select": {
|
||||
"ecobee_mode": {
|
||||
"state": {
|
||||
"away": "Away",
|
||||
"home": "Home",
|
||||
"sleep": "Sleep"
|
||||
}
|
||||
}
|
||||
},
|
||||
"sensor": {
|
||||
"thread_node_capabilities": {
|
||||
"state": {
|
||||
|
|
Loading…
Reference in New Issue