Allow the rounding to be optional in integral (#116884)

This commit is contained in:
Joakim Plate 2024-05-06 20:06:26 +02:00 committed by GitHub
parent 09be56964d
commit 1ef09048e6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 7 deletions

View file

@ -48,7 +48,7 @@ INTEGRATION_METHODS = [
OPTIONS_SCHEMA = vol.Schema(
{
vol.Required(CONF_ROUND_DIGITS, default=2): selector.NumberSelector(
vol.Optional(CONF_ROUND_DIGITS): selector.NumberSelector(
selector.NumberSelectorConfig(
min=0, max=6, mode=selector.NumberSelectorMode.BOX
),
@ -69,7 +69,7 @@ CONFIG_SCHEMA = vol.Schema(
options=INTEGRATION_METHODS, translation_key=CONF_METHOD
),
),
vol.Required(CONF_ROUND_DIGITS, default=2): selector.NumberSelector(
vol.Optional(CONF_ROUND_DIGITS): selector.NumberSelector(
selector.NumberSelectorConfig(
min=0,
max=6,