Lyric: fixed missed snake case conversions (#125382)

fixed missed snake case conversions
This commit is contained in:
Ryan Mattson 2024-09-06 04:45:39 -05:00 committed by GitHub
parent 84dcfb6ddc
commit ccbc300b68
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -358,8 +358,8 @@ class LyricClimate(LyricDeviceEntity, ClimateEntity):
await self._update_thermostat( await self._update_thermostat(
self.location, self.location,
device, device,
coolSetpoint=target_temp_high, cool_setpoint=target_temp_high,
heatSetpoint=target_temp_low, heat_setpoint=target_temp_low,
mode=mode, mode=mode,
) )
except LYRIC_EXCEPTIONS as exception: except LYRIC_EXCEPTIONS as exception:
@ -371,11 +371,11 @@ class LyricClimate(LyricDeviceEntity, ClimateEntity):
try: try:
if self.hvac_mode == HVACMode.COOL: if self.hvac_mode == HVACMode.COOL:
await self._update_thermostat( await self._update_thermostat(
self.location, device, coolSetpoint=temp self.location, device, cool_setpoint=temp
) )
else: else:
await self._update_thermostat( await self._update_thermostat(
self.location, device, heatSetpoint=temp self.location, device, heat_setpoint=temp
) )
except LYRIC_EXCEPTIONS as exception: except LYRIC_EXCEPTIONS as exception:
_LOGGER.error(exception) _LOGGER.error(exception)
@ -410,7 +410,7 @@ class LyricClimate(LyricDeviceEntity, ClimateEntity):
self.location, self.location,
self.device, self.device,
mode=HVAC_MODES[LYRIC_HVAC_MODE_HEAT], mode=HVAC_MODES[LYRIC_HVAC_MODE_HEAT],
autoChangeoverActive=False, auto_changeover_active=False,
) )
# Sleep 3 seconds before proceeding # Sleep 3 seconds before proceeding
await asyncio.sleep(3) await asyncio.sleep(3)
@ -422,7 +422,7 @@ class LyricClimate(LyricDeviceEntity, ClimateEntity):
self.location, self.location,
self.device, self.device,
mode=HVAC_MODES[LYRIC_HVAC_MODE_HEAT], mode=HVAC_MODES[LYRIC_HVAC_MODE_HEAT],
autoChangeoverActive=True, auto_changeover_active=True,
) )
else: else:
_LOGGER.debug( _LOGGER.debug(
@ -430,7 +430,7 @@ class LyricClimate(LyricDeviceEntity, ClimateEntity):
HVAC_MODES[self.device.changeable_values.mode], HVAC_MODES[self.device.changeable_values.mode],
) )
await self._update_thermostat( await self._update_thermostat(
self.location, self.device, autoChangeoverActive=True self.location, self.device, auto_changeover_active=True
) )
else: else:
_LOGGER.debug("HVAC mode passed to lyric: %s", LYRIC_HVAC_MODES[hvac_mode]) _LOGGER.debug("HVAC mode passed to lyric: %s", LYRIC_HVAC_MODES[hvac_mode])
@ -438,13 +438,13 @@ class LyricClimate(LyricDeviceEntity, ClimateEntity):
self.location, self.location,
self.device, self.device,
mode=LYRIC_HVAC_MODES[hvac_mode], mode=LYRIC_HVAC_MODES[hvac_mode],
autoChangeoverActive=False, auto_changeover_active=False,
) )
async def _async_set_hvac_mode_lcc(self, hvac_mode: HVACMode) -> None: async def _async_set_hvac_mode_lcc(self, hvac_mode: HVACMode) -> None:
"""Set hvac mode for LCC devices (e.g., T5,6).""" """Set hvac mode for LCC devices (e.g., T5,6)."""
_LOGGER.debug("HVAC mode passed to lyric: %s", LYRIC_HVAC_MODES[hvac_mode]) _LOGGER.debug("HVAC mode passed to lyric: %s", LYRIC_HVAC_MODES[hvac_mode])
# Set autoChangeoverActive to True if the mode being passed is Auto # Set auto_changeover_active to True if the mode being passed is Auto
# otherwise leave unchanged. # otherwise leave unchanged.
if ( if (
LYRIC_HVAC_MODES[hvac_mode] == LYRIC_HVAC_MODE_HEAT_COOL LYRIC_HVAC_MODES[hvac_mode] == LYRIC_HVAC_MODE_HEAT_COOL
@ -458,7 +458,7 @@ class LyricClimate(LyricDeviceEntity, ClimateEntity):
self.location, self.location,
self.device, self.device,
mode=LYRIC_HVAC_MODES[hvac_mode], mode=LYRIC_HVAC_MODES[hvac_mode],
autoChangeoverActive=auto_changeover, auto_changeover_active=auto_changeover,
) )
async def async_set_preset_mode(self, preset_mode: str) -> None: async def async_set_preset_mode(self, preset_mode: str) -> None:
@ -466,7 +466,7 @@ class LyricClimate(LyricDeviceEntity, ClimateEntity):
_LOGGER.debug("Set preset mode: %s", preset_mode) _LOGGER.debug("Set preset mode: %s", preset_mode)
try: try:
await self._update_thermostat( await self._update_thermostat(
self.location, self.device, thermostatSetpointStatus=preset_mode self.location, self.device, thermostat_setpoint_status=preset_mode
) )
except LYRIC_EXCEPTIONS as exception: except LYRIC_EXCEPTIONS as exception:
_LOGGER.error(exception) _LOGGER.error(exception)
@ -479,8 +479,8 @@ class LyricClimate(LyricDeviceEntity, ClimateEntity):
await self._update_thermostat( await self._update_thermostat(
self.location, self.location,
self.device, self.device,
thermostatSetpointStatus=PRESET_HOLD_UNTIL, thermostat_setpoint_status=PRESET_HOLD_UNTIL,
nextPeriodTime=time_period, next_period_time=time_period,
) )
except LYRIC_EXCEPTIONS as exception: except LYRIC_EXCEPTIONS as exception:
_LOGGER.error(exception) _LOGGER.error(exception)