Improve integration translation strings (#69246)

* Improve integration translation strings

* Update
This commit is contained in:
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}} {"select": {"options": UNIT_PREFIXES}}
), ),
vol.Required(CONF_UNIT_TIME, default=TIME_HOURS): selector.selector( 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": { "config": {
"step": { "step": {
"user": { "user": {
"title": "New Integration sensor", "title": "Add Riemann sum integral 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.", "description": "Create a sensor that calculates a Riemann sum to estimate the integral of a sensor.",
"data": { "data": {
"method": "Integration method", "method": "Integration method",
"name": "Name", "name": "Name",
"round": "Precision", "round": "Precision",
"source": "Input sensor", "source": "Input sensor",
"unit_prefix": "Metric prefix", "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": { "options": {
"step": { "step": {
"options": { "init": {
"description": "Precision controls the number of decimal digits in the output.",
"data": { "data": {
"round": "[%key:component::integration::config::step::user::data::round%]" "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", "round": "Precision",
"source": "Input sensor", "source": "Input sensor",
"unit_prefix": "Metric prefix", "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.", "data_description": {
"title": "New Integration sensor" "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": { "options": {
"step": { "step": {
"options": { "init": {
"data": { "data": {
"round": "Precision" "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"
} }