Skip to content

Commit

Permalink
Add new ClimateEntityFeature flags for HA 2024.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mill1000 committed Feb 8, 2024
1 parent 738f2c1 commit ddabd74
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion custom_components/midea_ac/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ class MideaClimateACDevice(MideaCoordinatorEntity, ClimateEntity):
"""Climate entity for Midea AC device."""

_attr_translation_key = DOMAIN
_enable_turn_on_off_backwards_compatibility = False

def __init__(self,
hass: HomeAssistant,
Expand All @@ -98,7 +99,12 @@ def __init__(self,

# Setup default supported features
self._supported_features = (
ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.FAN_MODE | ClimateEntityFeature.PRESET_MODE)
ClimateEntityFeature.TARGET_TEMPERATURE |
ClimateEntityFeature.FAN_MODE |
ClimateEntityFeature.PRESET_MODE |
ClimateEntityFeature.TURN_OFF |
ClimateEntityFeature.TURN_ON
)

# Setup supported presets
if options.get(CONF_SHOW_ALL_PRESETS):
Expand Down

0 comments on commit ddabd74

Please sign in to comment.