Skip to content

Commit

Permalink
Add first translations
Browse files Browse the repository at this point in the history
  • Loading branch information
iMicknl committed Jan 27, 2024
1 parent 78ee96b commit 943c1d1
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 11 deletions.
4 changes: 2 additions & 2 deletions custom_components/nest_protect/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from . import HomeAssistantNestProtectData
from .const import DOMAIN, LOGGER
from .entity import NestDescriptiveEntity, NestProtectDeviceClass
from .entity import NestDescriptiveEntity


@dataclass
Expand All @@ -24,11 +24,11 @@ class NestProtectSelectDescription(SelectEntityDescription):
SENSOR_DESCRIPTIONS: list[SelectEntityDescription] = [
NestProtectSelectDescription(
key="night_light_brightness",
translation_key="night_light_brightness",
name="Brightness",
icon="mdi:lightbulb-on",
options=[*PRESET_TO_BRIGHTNESS],
entity_category=EntityCategory.CONFIG,
device_class=NestProtectDeviceClass.NIGHT_LIGHT_BRIGHTNESS,
),
]

Expand Down
12 changes: 12 additions & 0 deletions custom_components/nest_protect/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,17 @@
"abort": {
"already_configured": "[%key:common::config_flow::abort::already_configured_account%]"
}
},
"entity": {
"select": {
"night_light_brightness": {
"name": "Night Light Brightness",
"state": {
"low": "Low",
"medium": "Medium",
"high": "High"
}
}
}
}
}
12 changes: 12 additions & 0 deletions custom_components/nest_protect/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,17 @@
}
}
}
},
"entity": {
"select": {
"night_light_brightness": {
"name": "Night Light Brightness",
"state": {
"low": "Low",
"medium": "Medium",
"high": "High"
}
}
}
}
}
9 changes: 0 additions & 9 deletions custom_components/nest_protect/translations/select.en.json

This file was deleted.

0 comments on commit 943c1d1

Please sign in to comment.