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