mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 20:27:08 +00:00
Translate config flow for sensor measurement option in group (#87374)
* Translate config flow * reset en * Delete en.json
This commit is contained in:
parent
5e1c9ba80d
commit
6736ed67ba
@ -24,14 +24,14 @@ from .binary_sensor import CONF_ALL
|
|||||||
from .const import CONF_HIDE_MEMBERS, CONF_IGNORE_NON_NUMERIC
|
from .const import CONF_HIDE_MEMBERS, CONF_IGNORE_NON_NUMERIC
|
||||||
|
|
||||||
_STATISTIC_MEASURES = [
|
_STATISTIC_MEASURES = [
|
||||||
selector.SelectOptionDict(value="min", label="Minimum"),
|
"min",
|
||||||
selector.SelectOptionDict(value="max", label="Maximum"),
|
"max",
|
||||||
selector.SelectOptionDict(value="mean", label="Arithmetic mean"),
|
"mean",
|
||||||
selector.SelectOptionDict(value="median", label="Median"),
|
"median",
|
||||||
selector.SelectOptionDict(value="last", label="Most recently updated"),
|
"last",
|
||||||
selector.SelectOptionDict(value="range", label="Statistical range"),
|
"range",
|
||||||
selector.SelectOptionDict(value="sum", label="Sum"),
|
"sum",
|
||||||
selector.SelectOptionDict(value="product", label="Product"),
|
"product",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@ -80,13 +80,17 @@ BINARY_SENSOR_CONFIG_SCHEMA = basic_group_config_schema("binary_sensor").extend(
|
|||||||
|
|
||||||
SENSOR_CONFIG_EXTENDS = {
|
SENSOR_CONFIG_EXTENDS = {
|
||||||
vol.Required(CONF_TYPE): selector.SelectSelector(
|
vol.Required(CONF_TYPE): selector.SelectSelector(
|
||||||
selector.SelectSelectorConfig(options=_STATISTIC_MEASURES),
|
selector.SelectSelectorConfig(
|
||||||
|
options=_STATISTIC_MEASURES, translation_key=CONF_TYPE
|
||||||
|
),
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
SENSOR_OPTIONS = {
|
SENSOR_OPTIONS = {
|
||||||
vol.Optional(CONF_IGNORE_NON_NUMERIC, default=False): selector.BooleanSelector(),
|
vol.Optional(CONF_IGNORE_NON_NUMERIC, default=False): selector.BooleanSelector(),
|
||||||
vol.Required(CONF_TYPE): selector.SelectSelector(
|
vol.Required(CONF_TYPE): selector.SelectSelector(
|
||||||
selector.SelectSelectorConfig(options=_STATISTIC_MEASURES),
|
selector.SelectSelectorConfig(
|
||||||
|
options=_STATISTIC_MEASURES, translation_key=CONF_TYPE
|
||||||
|
),
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -176,5 +176,19 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"selector": {
|
||||||
|
"type": {
|
||||||
|
"options": {
|
||||||
|
"min": "Minimum",
|
||||||
|
"max": "Maximum",
|
||||||
|
"mean": "Arithmetic mean",
|
||||||
|
"median": "Median",
|
||||||
|
"last": "Most recently updated",
|
||||||
|
"range": "Statistical range",
|
||||||
|
"sum": "Sum",
|
||||||
|
"product": "Product"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user