Improve integration translation strings (#69246)

* Improve integration translation strings

* Update
pull/69338/head
Erik Montnemery 2022-04-05 20:08:17 +02:00 committed by GitHub
parent 2689f1a7fd
commit fcad10dd0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 12 deletions

View File

@ -83,7 +83,7 @@ CONFIG_SCHEMA = vol.Schema(
{"select": {"options": UNIT_PREFIXES}}
),
vol.Required(CONF_UNIT_TIME, default=TIME_HOURS): selector.selector(
{"select": {"options": TIME_UNITS}}
{"select": {"options": TIME_UNITS, "mode": "dropdown"}}
),
}
)

View File

@ -1,26 +1,34 @@
{
"title": "Integration - Riemann sum integral sensor",
"config": {
"step": {
"user": {
"title": "New Integration sensor",
"description": "Precision controls the number of decimal digits in the output.\nThe sum will be scaled according to the selected metric prefix and integration time.",
"title": "Add Riemann sum integral sensor",
"description": "Create a sensor that calculates a Riemann sum to estimate the integral of a sensor.",
"data": {
"method": "Integration method",
"name": "Name",
"round": "Precision",
"source": "Input sensor",
"unit_prefix": "Metric prefix",
"unit_time": "Integration time"
"unit_time": "Time unit"
},
"data_description": {
"round": "Controls the number of decimal digits in the output.",
"unit_prefix": "The output will be scaled according to the selected metric prefix.",
"unit_time": "The output will be scaled according to the selected time unit."
}
}
}
},
"options": {
"step": {
"options": {
"description": "Precision controls the number of decimal digits in the output.",
"init": {
"data": {
"round": "[%key:component::integration::config::step::user::data::round%]"
},
"data_description": {
"round": "[%key:component::integration::config::step::user::data_description::round%]"
}
}
}

View File

@ -8,21 +8,29 @@
"round": "Precision",
"source": "Input sensor",
"unit_prefix": "Metric prefix",
"unit_time": "Integration time"
"unit_time": "Time unit"
},
"description": "Precision controls the number of decimal digits in the output.\nThe sum will be scaled according to the selected metric prefix and integration time.",
"title": "New Integration sensor"
"data_description": {
"round": "Controls the number of decimal digits in the output.",
"unit_prefix": "The output will be scaled according to the selected metric prefix.",
"unit_time": "The output will be scaled according to the selected time unit."
},
"description": "Create a sensor that calculates a Riemann sum to estimate the integral of a sensor.",
"title": "Add Riemann sum integral sensor"
}
}
},
"options": {
"step": {
"options": {
"init": {
"data": {
"round": "Precision"
},
"description": "Precision controls the number of decimal digits in the output."
"data_description": {
"round": "Controls the number of decimal digits in the output."
}
}
}
}
},
"title": "Integration - Riemann sum integral sensor"
}