Remove "none" in favor of optional select in integration (#101396)

This commit is contained in:
Robert Resch 2023-10-11 17:36:53 +02:00 committed by GitHub
parent 7db2fdd68c
commit 1915fee9ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 12 deletions

View file

@ -27,7 +27,6 @@ from .const import (
)
UNIT_PREFIXES = [
selector.SelectOptionDict(value="none", label="none"),
selector.SelectOptionDict(value="k", label="k (kilo)"),
selector.SelectOptionDict(value="M", label="M (mega)"),
selector.SelectOptionDict(value="G", label="G (giga)"),
@ -74,7 +73,7 @@ CONFIG_SCHEMA = vol.Schema(
unit_of_measurement="decimals",
),
),
vol.Required(CONF_UNIT_PREFIX, default="none"): selector.SelectSelector(
vol.Optional(CONF_UNIT_PREFIX): selector.SelectSelector(
selector.SelectSelectorConfig(options=UNIT_PREFIXES),
),
vol.Required(CONF_UNIT_TIME, default=UnitOfTime.HOURS): selector.SelectSelector(