Migrate HomeKit Controller translations (#83304)

pull/83310/head
Franck Nijhof 2022-12-05 13:44:59 +01:00 committed by GitHub
parent 226a880645
commit 32dfc59d9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 19 additions and 16 deletions

View File

@ -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,

View File

@ -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:

View File

@ -71,6 +71,15 @@
}
},
"entity": {
"select": {
"ecobee_mode": {
"state": {
"away": "Away",
"home": "Home",
"sleep": "Sleep"
}
}
},
"sensor": {
"thread_node_capabilities": {
"state": {

View File

@ -1,9 +0,0 @@
{
"state": {
"homekit_controller__ecobee_mode": {
"home": "Home",
"sleep": "Sleep",
"away": "Away"
}
}
}

View File

@ -70,6 +70,15 @@
}
},
"entity": {
"select": {
"ecobee_mode": {
"state": {
"away": "Away",
"home": "Home",
"sleep": "Sleep"
}
}
},
"sensor": {
"thread_node_capabilities": {
"state": {