mirror of
https://github.com/home-assistant/core.git
synced 2025-04-26 10:17:51 +00:00
Set minimal value for modules power - Forecast.solar (#108166)
This commit is contained in:
parent
db81f4d046
commit
0f185a9a09
@ -75,7 +75,9 @@ class ForecastSolarFlowHandler(ConfigFlow, domain=DOMAIN):
|
||||
vol.Required(CONF_AZIMUTH, default=180): vol.All(
|
||||
vol.Coerce(int), vol.Range(min=0, max=360)
|
||||
),
|
||||
vol.Required(CONF_MODULES_POWER): vol.Coerce(int),
|
||||
vol.Required(CONF_MODULES_POWER): vol.All(
|
||||
vol.Coerce(int), vol.Range(min=1)
|
||||
),
|
||||
}
|
||||
),
|
||||
)
|
||||
@ -126,7 +128,7 @@ class ForecastSolarOptionFlowHandler(OptionsFlow):
|
||||
vol.Required(
|
||||
CONF_MODULES_POWER,
|
||||
default=self.config_entry.options[CONF_MODULES_POWER],
|
||||
): vol.Coerce(int),
|
||||
): vol.All(vol.Coerce(int), vol.Range(min=1)),
|
||||
vol.Optional(
|
||||
CONF_DAMPING_MORNING,
|
||||
default=self.config_entry.options.get(
|
||||
|
Loading…
x
Reference in New Issue
Block a user