Skip to content

Commit

Permalink
Add translations
Browse files Browse the repository at this point in the history
  • Loading branch information
bramstroker committed Aug 5, 2023
1 parent 54b7222 commit 46fe710
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
4 changes: 3 additions & 1 deletion custom_components/powercalc/config_flow.py
Expand Up @@ -129,7 +129,9 @@
SCHEMA_REAL_POWER = vol.Schema(
{
vol.Required(CONF_NAME): selector.TextSelector(),
vol.Required(CONF_ENTITY_ID): selector.EntitySelector(),
vol.Required(CONF_ENTITY_ID): selector.EntitySelector(
selector.EntitySelectorConfig(device_class=SensorDeviceClass.POWER),
),
vol.Optional(
CONF_CREATE_UTILITY_METERS,
default=False,
Expand Down
13 changes: 13 additions & 0 deletions custom_components/powercalc/strings.json
Expand Up @@ -49,6 +49,19 @@
"area": "Adds all powercalc sensors from the specified area"
}
},
"real_power": {
"title": "Create an energy sensor for an existing power sensor",
"description": "Currently specific settings can only be configured globally",
"data": {
"name": "[%key:common::config_flow::data::name%]",
"entity_id": "Power sensor id",
"create_utility_meters": "[%key:component::powercalc::config::step::virtual_power::data::create_utility_meters%]"
},
"data_description": {
"name": "Base name for the energy and utility meter. Full entity name will be set accordingly to energy_sensor_naming setting",
"create_utility_meters": "Let powercalc create utility meters, which cycle daily, hourly etc."
}
},
"virtual_power": {
"title": "Create a virtual power sensor",
"description": "See the readme for more information about the possible strategies and configuration options",
Expand Down
13 changes: 13 additions & 0 deletions custom_components/powercalc/translations/en.json
Expand Up @@ -107,6 +107,19 @@
"description": "Select the device model. See the [list]({supported_models_link}) of supported models for more information",
"title": "Model config"
},
"real_power": {
"data": {
"name": "Name",
"entity_id": "Power sensor id",
"create_utility_meters": "Create utility meters"
},
"data_description": {
"name": "Base name for the energy and utility meter. Full entity name will be set accordingly to energy_sensor_naming setting",
"create_utility_meters": "Let powercalc create utility meters, which cycle daily, hourly etc."
},
"description": "Currently specific settings can only be configured globally",
"title": "Create an energy sensor for an existing power sensor"
},
"sub_profile": {
"data": {
"sub_profile": "Sub profile"
Expand Down

0 comments on commit 46fe710

Please sign in to comment.