Skip to content

Commit

Permalink
[TASK] make support for HA 2024.2 complete
Browse files Browse the repository at this point in the history
  • Loading branch information
KartoffelToby committed Feb 19, 2024
1 parent 3ef10e0 commit c06f80f
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions custom_components/better_thermostat/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,7 @@
ATTR_HVAC_MODE,
ATTR_TARGET_TEMP_HIGH,
ATTR_TARGET_TEMP_LOW,
PRESET_AWAY,
PRESET_NONE,
PRESET_ECO,
PRESET_BOOST,
PRESET_COMFORT,
PRESET_HOME,
PRESET_SLEEP,
PRESET_ACTIVITY,
SUPPORT_PRESET_MODE,
)
from homeassistant.components.climate.const import (
ATTR_MAX_TEMP,
Expand Down Expand Up @@ -169,6 +161,9 @@ async def async_service_handler(self, data: ServiceCall):
class BetterThermostat(ClimateEntity, RestoreEntity, ABC):
"""Representation of a Better Thermostat device."""

_attr_has_entity_name = True
_enable_turn_on_off_backwards_compatibility = False

async def set_temp_temperature(self, temperature):
if self._saved_temperature is None:
self._saved_temperature = self.bt_target_temp
Expand Down Expand Up @@ -271,7 +266,7 @@ def __init__(
self.bt_max_temp = 30
self.bt_target_temp = 5.0
self.bt_target_cooltemp = None
self._support_flags = SUPPORT_FLAGS | SUPPORT_PRESET_MODE
self._support_flags = SUPPORT_FLAGS | ClimateEntityFeature.PRESET_MODE
self.bt_hvac_mode = None
self.closed_window_triggered = False
self.call_for_heat = True
Expand Down

0 comments on commit c06f80f

Please sign in to comment.