Skip to content

Commit

Permalink
With config_flow ok
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Marc Collin committed Jul 22, 2023
1 parent 9709a9e commit 31d862a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions custom_components/versatile_thermostat/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
CONF_USE_MOTION_FEATURE,
CONF_USE_PRESENCE_FEATURE,
CONF_USE_POWER_FEATURE,
CONF_USE_AC_MODE,
CONF_AC_MODE,
CONF_THERMOSTAT_TYPES,
UnknownEntity,
WindowOpenDetectionMethod,
Expand Down Expand Up @@ -231,7 +231,7 @@ def __init__(self, infos) -> None:
vol.Required(CONF_CLIMATE): selector.EntitySelector(
selector.EntitySelectorConfig(domain=CLIMATE_DOMAIN),
),
vol.Optional(CONF_USE_AC_MODE, default=False): cv.boolean,
vol.Optional(CONF_AC_MODE, default=False): cv.boolean,
}
)

Expand Down Expand Up @@ -494,7 +494,7 @@ async def async_step_presets(self, user_input: dict | None = None) -> FlowResult
elif self._infos[CONF_USE_PRESENCE_FEATURE]:
next_step = self.async_step_presence

if self._infos[CONF_USE_AC_MODE]:
if self._infos[CONF_AC_MODE]:
schema = self.STEP_PRESETS_WITH_AC_DATA_SCHEMA
else:
schema = self.STEP_PRESETS_DATA_SCHEMA
Expand Down Expand Up @@ -550,7 +550,7 @@ async def async_step_presence(self, user_input: dict | None = None) -> FlowResul
"""Handle the presence management flow steps"""
_LOGGER.debug("Into ConfigFlow.async_step_presence user_input=%s", user_input)

if self._infos[CONF_USE_AC_MODE]:
if self._infos[CONF_AC_MODE]:
schema = self.STEP_PRESENCE_WITH_AC_DATA_SCHEMA
else:
schema = self.STEP_PRESENCE_DATA_SCHEMA
Expand Down Expand Up @@ -689,7 +689,7 @@ async def async_step_presets(self, user_input: dict | None = None) -> FlowResult
elif self._infos[CONF_USE_PRESENCE_FEATURE]:
next_step = self.async_step_presence

if self._infos[CONF_USE_AC_MODE]:
if self._infos[CONF_AC_MODE]:
schema = self.STEP_PRESETS_WITH_AC_DATA_SCHEMA
else:
schema = self.STEP_PRESETS_DATA_SCHEMA
Expand Down Expand Up @@ -752,7 +752,7 @@ async def async_step_presence(self, user_input: dict | None = None) -> FlowResul
"Into OptionsFlowHandler.async_step_presence user_input=%s", user_input
)

if self._infos[CONF_USE_AC_MODE]:
if self._infos[CONF_AC_MODE]:
schema = self.STEP_PRESENCE_WITH_AC_DATA_SCHEMA
else:
schema = self.STEP_PRESENCE_DATA_SCHEMA
Expand Down
4 changes: 2 additions & 2 deletions custom_components/versatile_thermostat/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
CONF_USE_MOTION_FEATURE = "use_motion_feature"
CONF_USE_PRESENCE_FEATURE = "use_presence_feature"
CONF_USE_POWER_FEATURE = "use_power_feature"
CONF_USE_AC_MODE = "use_ac_mode"
CONF_AC_MODE = "ac_mode"
CONF_WINDOW_AUTO_OPEN_THRESHOLD = "window_auto_open_threshold"
CONF_WINDOW_AUTO_CLOSE_THRESHOLD = "window_auto_close_threshold"
CONF_WINDOW_AUTO_MAX_DURATION = "window_auto_max_duration"
Expand Down Expand Up @@ -162,7 +162,7 @@
CONF_USE_MOTION_FEATURE,
CONF_USE_PRESENCE_FEATURE,
CONF_USE_POWER_FEATURE,
CONF_USE_AC_MODE,
CONF_AC_MODE,
]
+ CONF_PRESETS_VALUES
+ CONF_PRESETS_AWAY_VALUES
Expand Down

0 comments on commit 31d862a

Please sign in to comment.