Allow non-integers in threshold sensor config flow (#78137)

pull/78142/head
Erik Montnemery 2022-09-09 16:05:14 +02:00 committed by GitHub
parent dd86d7f0ea
commit 5c40dffb29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 3 deletions

View File

@ -30,13 +30,19 @@ OPTIONS_SCHEMA = vol.Schema(
vol.Required(
CONF_HYSTERESIS, default=DEFAULT_HYSTERESIS
): selector.NumberSelector(
selector.NumberSelectorConfig(mode=selector.NumberSelectorMode.BOX),
selector.NumberSelectorConfig(
mode=selector.NumberSelectorMode.BOX, step=1e-3
),
),
vol.Optional(CONF_LOWER): selector.NumberSelector(
selector.NumberSelectorConfig(mode=selector.NumberSelectorMode.BOX),
selector.NumberSelectorConfig(
mode=selector.NumberSelectorMode.BOX, step=1e-3
),
),
vol.Optional(CONF_UPPER): selector.NumberSelector(
selector.NumberSelectorConfig(mode=selector.NumberSelectorMode.BOX),
selector.NumberSelectorConfig(
mode=selector.NumberSelectorMode.BOX, step=1e-3
),
),
}
)