Replace lists with tuples (2) (#53685)

This commit is contained in:
Marc Mueller 2021-07-30 01:20:03 +02:00 committed by GitHub
parent 5eba3e485b
commit 0815eede4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
61 changed files with 137 additions and 139 deletions

View file

@ -396,7 +396,7 @@ class NetatmoThermostat(NetatmoBase, ClimateEntity):
)
if (
preset_mode in [PRESET_BOOST, STATE_NETATMO_MAX]
preset_mode in (PRESET_BOOST, STATE_NETATMO_MAX)
and self._model == NA_VALVE
and self.hvac_mode == HVAC_MODE_HEAT
):
@ -405,7 +405,7 @@ class NetatmoThermostat(NetatmoBase, ClimateEntity):
STATE_NETATMO_HOME,
)
elif (
preset_mode in [PRESET_BOOST, STATE_NETATMO_MAX] and self._model == NA_VALVE
preset_mode in (PRESET_BOOST, STATE_NETATMO_MAX) and self._model == NA_VALVE
):
await self._home_status.async_set_room_thermpoint(
self._id,
@ -413,17 +413,17 @@ class NetatmoThermostat(NetatmoBase, ClimateEntity):
DEFAULT_MAX_TEMP,
)
elif (
preset_mode in [PRESET_BOOST, STATE_NETATMO_MAX]
preset_mode in (PRESET_BOOST, STATE_NETATMO_MAX)
and self.hvac_mode == HVAC_MODE_HEAT
):
await self._home_status.async_set_room_thermpoint(
self._id, STATE_NETATMO_HOME
)
elif preset_mode in [PRESET_BOOST, STATE_NETATMO_MAX]:
elif preset_mode in (PRESET_BOOST, STATE_NETATMO_MAX):
await self._home_status.async_set_room_thermpoint(
self._id, PRESET_MAP_NETATMO[preset_mode]
)
elif preset_mode in [PRESET_SCHEDULE, PRESET_FROST_GUARD, PRESET_AWAY]:
elif preset_mode in (PRESET_SCHEDULE, PRESET_FROST_GUARD, PRESET_AWAY):
await self._home_status.async_set_thermmode(PRESET_MAP_NETATMO[preset_mode])
else:
_LOGGER.error("Preset mode '%s' not available", preset_mode)