Skip to content

Commit

Permalink
- Minor fix in OptionsFlow
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdelprete committed Jan 13, 2025
1 parent d8fd0c9 commit 30e8973
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions custom_components/sinapsi_alfa/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,19 +148,18 @@ class SinapsiAlfaOptionsFlow(OptionsFlow):

def __init__(self, config_entry: ConfigEntry) -> None:
"""Initialize option flow instance."""
self.config_entry = config_entry
self.data_schema = vol.Schema(
{
vol.Required(
CONF_HOST,
): cv.string,
vol.Required(
CONF_PORT,
default=self.config_entry.data.get(CONF_PORT),
default=config_entry.data.get(CONF_PORT),
): vol.All(vol.Coerce(int), vol.Range(min=0, max=65535)),
vol.Required(
CONF_SCAN_INTERVAL,
default=self.config_entry.data.get(CONF_SCAN_INTERVAL),
default=config_entry.data.get(CONF_SCAN_INTERVAL),
): selector(
{
"number": {
Expand Down

0 comments on commit 30e8973

Please sign in to comment.