Skip to content

Commit

Permalink
setting the proper ClimateEntityFeature. (#46)
Browse files Browse the repository at this point in the history
WARNING (MainThread) [homeassistant.components.climate] Entity None (<class 'custom_components.duepi_evo.climate.DuepiEvoDevice'>) implements HVACMode(s): heat, off and therefore implicitly supports the turn_on/turn_off methods without setting the proper ClimateEntityFeature.
  • Loading branch information
aceindy committed Mar 26, 2024
1 parent aa14658 commit 8979550
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion custom_components/duepi_evo/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

_LOGGER = logging.getLogger(__name__)

SUPPORT_FLAGS = ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.FAN_MODE
SUPPORT_FLAGS = ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.FAN_MODE | ClimateEntityFeature.TURN_OFF | ClimateEntityFeature.TURN_ON

"""
Supported hvac modes:
Expand Down Expand Up @@ -134,6 +134,10 @@ class DuepiEvoDevice(ClimateEntity):
"""Representation of a DuepiEvoDevice."""

def __init__(self, session, config) -> None:

self._enable_turn_on_off_backwards_compatibility = False
self._attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.TURN_OFF | ClimateEntityFeature.TURN_ON

"""Initialize the DuepiEvoDevice."""
self._session = session
self._name = config.get(CONF_NAME)
Expand Down

0 comments on commit 8979550

Please sign in to comment.