albertogeniola / meross-homeassistant

Custom component that leverages the Meross IoT library to integrate with Homeassistant
MIT License
718 stars 82 forks source link

2024.1 - Deprication of SUPPORT_*** #480

Closed ChristophCaina closed 8 months ago

ChristophCaina commented 9 months ago

Describe the bug 2024.1 will throw a deprication warning for

from homeassistant.components.climate import SUPPORT_TARGET_TEMPERATURE, SUPPORT_PRESET_MODE, HVAC_MODE_OFF, \
    HVAC_MODE_HEAT

SUPPORT_TAGET_TEMPERATURE and SUPPORT_PRESET_MODE will be depricated and should be replaced by ClimateEntityFeature.TAGET_TEMPERATURE and ClimateEntityFeature.PRESET_MODE

https://developers.home-assistant.io/blog/2022/04/02/support-constants-deprecation


The same applies for:

from homeassistant.components.cover import CoverEntity, SUPPORT_STOP
from homeassistant.components.cover import DEVICE_CLASS_GARAGE, DEVICE_CLASS_SHUTTER, SUPPORT_OPEN, SUPPORT_CLOSE

https://developers.home-assistant.io/docs/core/entity/cover/#supported-features

Your environment HomeAssistant version: -- PLEASE SPECIFY -- Hassio Version (if applicable): -- PLEASE SPECIFY -- Hardware environment: -- PLEASE SPECIFY --

Logs taken when the issue happened

--- PASTE LOGS HERE ---
dinan5 commented 8 months ago

Having the same issue.

swingerman commented 8 months ago

Update home assistant package and import ClimateEntityFeature enum

albertogeniola commented 8 months ago

Fixed with latest release .