Fix implicit-return in overkiz (#123000)

This commit is contained in:
epenet 2024-08-04 20:18:19 +02:00 committed by GitHub
parent e682d8c6e2
commit 30f4d1b958
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 5 deletions

View File

@ -234,7 +234,8 @@ class AtlanticPassAPCZoneControlZone(AtlanticPassAPCHeatingZone):
"""Set new target hvac mode."""
if self.is_using_derogated_temperature_fallback:
return await super().async_set_hvac_mode(hvac_mode)
await super().async_set_hvac_mode(hvac_mode)
return
# They are mainly managed by the Zone Control device
# However, it make sense to map the OFF Mode to the Overkiz STOP Preset
@ -287,7 +288,8 @@ class AtlanticPassAPCZoneControlZone(AtlanticPassAPCHeatingZone):
"""Set new preset mode."""
if self.is_using_derogated_temperature_fallback:
return await super().async_set_preset_mode(preset_mode)
await super().async_set_preset_mode(preset_mode)
return
mode = PRESET_MODES_TO_OVERKIZ[preset_mode]
@ -361,7 +363,8 @@ class AtlanticPassAPCZoneControlZone(AtlanticPassAPCHeatingZone):
"""Set new temperature."""
if self.is_using_derogated_temperature_fallback:
return await super().async_set_temperature(**kwargs)
await super().async_set_temperature(**kwargs)
return
target_temperature = kwargs.get(ATTR_TEMPERATURE)
target_temp_low = kwargs.get(ATTR_TARGET_TEMP_LOW)

View File

@ -181,6 +181,7 @@ class SomfyHeatingTemperatureInterface(OverkizEntity, ClimateEntity):
OverkizState.OVP_HEATING_TEMPERATURE_INTERFACE_SETPOINT_MODE
]
) and mode.value_as_str:
return await self.executor.async_execute_command(
await self.executor.async_execute_command(
SETPOINT_MODE_TO_OVERKIZ_COMMAND[mode.value_as_str], temperature
)
return

View File

@ -87,9 +87,10 @@ class HitachiDHW(OverkizEntity, WaterHeaterEntity):
"""Set new target operation mode."""
# Turn water heater off
if operation_mode == OverkizCommandParam.OFF:
return await self.executor.async_execute_command(
await self.executor.async_execute_command(
OverkizCommand.SET_CONTROL_DHW, OverkizCommandParam.STOP
)
return
# Turn water heater on, when off
if self.current_operation == OverkizCommandParam.OFF: