mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Improve min_max translation strings (#69248)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
parent
7f1d10dcca
commit
8222b783a3
@ -16,7 +16,14 @@ from homeassistant.helpers.schema_config_entry_flow import (
|
||||
|
||||
from .const import CONF_ENTITY_IDS, CONF_ROUND_DIGITS, DOMAIN
|
||||
|
||||
_STATISTIC_MEASURES = ["last", "max", "mean", "min", "median"]
|
||||
_STATISTIC_MEASURES = [
|
||||
{"value": "min", "label": "Minimum"},
|
||||
{"value": "max", "label": "Maximum"},
|
||||
{"value": "mean", "label": "Arithmetic mean"},
|
||||
{"value": "median", "label": "Median"},
|
||||
{"value": "last", "label": "Most recently updated"},
|
||||
]
|
||||
|
||||
|
||||
OPTIONS_SCHEMA = vol.Schema(
|
||||
{
|
||||
|
@ -3,24 +3,30 @@
|
||||
"config": {
|
||||
"step": {
|
||||
"user": {
|
||||
"description": "Precision controls the number of decimal digits when the statistics characteristic is mean or median.",
|
||||
"title": "Add min / max / mean / median sensor",
|
||||
"description": "Create a sensor that calculates a min, max, mean or median value from a list of input sensors.",
|
||||
"data": {
|
||||
"entity_ids": "Input entities",
|
||||
"name": "Name",
|
||||
"round_digits": "Precision",
|
||||
"type": "Statistic characteristic"
|
||||
},
|
||||
"data_description": {
|
||||
"round_digits": "Controls the number of decimal digits in the output when the statistics characteristic is mean or median."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"step": {
|
||||
"options": {
|
||||
"description": "[%key:component::min_max::config::step::user::description%]",
|
||||
"init": {
|
||||
"data": {
|
||||
"entity_ids": "[%key:component::min_max::config::step::user::data::entity_ids%]",
|
||||
"round_digits": "[%key:component::min_max::config::step::user::data::round_digits%]",
|
||||
"type": "[%key:component::min_max::config::step::user::data::type%]"
|
||||
},
|
||||
"data_description": {
|
||||
"round_digits": "[%key:component::min_max::config::step::user::data_description::round_digits%]"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,19 +8,25 @@
|
||||
"round_digits": "Precision",
|
||||
"type": "Statistic characteristic"
|
||||
},
|
||||
"description": "Precision controls the number of decimal digits when the statistics characteristic is mean or median."
|
||||
"data_description": {
|
||||
"round_digits": "Controls the number of decimal digits in the output when the statistics characteristic is mean or median."
|
||||
},
|
||||
"description": "Create a sensor that calculates a min, max, mean or median value from a list of input sensors.",
|
||||
"title": "Add min / max / mean / median sensor"
|
||||
}
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"step": {
|
||||
"options": {
|
||||
"init": {
|
||||
"data": {
|
||||
"entity_ids": "Input entities",
|
||||
"round_digits": "Precision",
|
||||
"type": "Statistic characteristic"
|
||||
},
|
||||
"description": "Precision controls the number of decimal digits when the statistics characteristic is mean or median."
|
||||
"data_description": {
|
||||
"round_digits": "Controls the number of decimal digits in the output when the statistics characteristic is mean or median."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user