syssi / xiaomi_airpurifier

Xiaomi Mi Air Purifier and Xiaomi Mi Air Humidifier integration for Home Assistant
Apache License 2.0
456 stars 113 forks source link

2024.1 warnings in log: deprecated constants & supported features #359

Closed ildar170975 closed 3 months ago

ildar170975 commented 10 months ago

Starting from 2024.1:

2024-01-04 02:04:23.097 WARNING (MainThread) [homeassistant.components.fan] SUPPORT_DIRECTION was used from xiaomi_miio_airpurifier, this is a deprecated constant which will be removed in HA Core 2025.1. Use FanEntityFeature.DIRECTION instead, please create a bug report at https://github.com/syssi/xiaomi_airpurifier/issues 2024-01-04 02:04:23.100 WARNING (MainThread) [homeassistant.components.fan] SUPPORT_OSCILLATE was used from xiaomi_miio_airpurifier, this is a deprecated constant which will be removed in HA Core 2025.1. Use FanEntityFeature.OSCILLATE instead, please create a bug report at https://github.com/syssi/xiaomi_airpurifier/issues 2024-01-04 02:04:23.104 WARNING (MainThread) [homeassistant.components.fan] SUPPORT_PRESET_MODE was used from xiaomi_miio_airpurifier, this is a deprecated constant which will be removed in HA Core 2025.1. Use FanEntityFeature.PRESET_MODE instead, please create a bug report at https://github.com/syssi/xiaomi_airpurifier/issues 2024-01-04 02:04:23.108 WARNING (MainThread) [homeassistant.components.fan] SUPPORT_SET_SPEED was used from xiaomi_miio_airpurifier, this is a deprecated constant which will be removed in HA Core 2025.1. Use FanEntityFeature.SET_SPEED instead, please create a bug report at https://github.com/syssi/xiaomi_airpurifier/issues 2024-01-04 02:04:23.111 WARNING (MainThread) [homeassistant.components.fan] SUPPORT_DIRECTION was used from xiaomi_miio_airpurifier, this is a deprecated constant which will be removed in HA Core 2025.1. Use FanEntityFeature.DIRECTION instead, please create a bug report at https://github.com/syssi/xiaomi_airpurifier/issues 2024-01-04 02:04:23.114 WARNING (MainThread) [homeassistant.components.fan] SUPPORT_OSCILLATE was used from xiaomi_miio_airpurifier, this is a deprecated constant which will be removed in HA Core 2025.1. Use FanEntityFeature.OSCILLATE instead, please create a bug report at https://github.com/syssi/xiaomi_airpurifier/issues 2024-01-04 02:04:23.118 WARNING (MainThread) [homeassistant.components.fan] SUPPORT_PRESET_MODE was used from xiaomi_miio_airpurifier, this is a deprecated constant which will be removed in HA Core 2025.1. Use FanEntityFeature.PRESET_MODE instead, please create a bug report at https://github.com/syssi/xiaomi_airpurifier/issues 2024-01-04 02:04:23.121 WARNING (MainThread) [homeassistant.components.fan] SUPPORT_SET_SPEED was used from xiaomi_miio_airpurifier, this is a deprecated constant which will be removed in HA Core 2025.1. Use FanEntityFeature.SET_SPEED instead, please create a bug report at https://github.com/syssi/xiaomi_airpurifier/issues

2024-01-04 02:04:23.957 WARNING (MainThread) [homeassistant.helpers.entity] Entity fan.xiaomi_mijia_300_1 (<class 'custom_components.xiaomi_miio_airpurifier.fan.XiaomiAirFreshT2017'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <FanEntityFeature.PRESET_MODE: 8>, please create a bug report at https://github.com/syssi/xiaomi_airpurifier/issues and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation

coasttech commented 10 months ago

Same here 👆

c4xp commented 9 months ago

+1

hergie1976 commented 9 months ago

Same here:

Logger: homeassistant.components.fan Source: helpers/deprecation.py:205 Integration: Lüfter (documentation, issues) First occurred: 09:31:17 (8 occurrences) Last logged: 09:31:17

SUPPORT_DIRECTION was used from xiaomi_miio_airpurifier, this is a deprecated constant which will be removed in HA Core 2025.1. Use FanEntityFeature.DIRECTION instead, please create a bug report at https://github.com/syssi/xiaomi_airpurifier/issues
SUPPORT_OSCILLATE was used from xiaomi_miio_airpurifier, this is a deprecated constant which will be removed in HA Core 2025.1. Use FanEntityFeature.OSCILLATE instead, please create a bug report at https://github.com/syssi/xiaomi_airpurifier/issues
SUPPORT_PRESET_MODE was used from xiaomi_miio_airpurifier, this is a deprecated constant which will be removed in HA Core 2025.1. Use FanEntityFeature.PRESET_MODE instead, please create a bug report at https://github.com/syssi/xiaomi_airpurifier/issues
SUPPORT_SET_SPEED was used from xiaomi_miio_airpurifier, this is a deprecated constant which will be removed in HA Core 2025.1. Use FanEntityFeature.SET_SPEED instead, please create a bug report at https://github.com/syssi/xiaomi_airpurifier/issues
Bench-01 commented 8 months ago

same here 🙆🏽‍♂️

EtiolEhomba commented 3 months ago

@syssi Please approve this fix https://github.com/syssi/xiaomi_airpurifier/pull/368

syssi commented 3 months ago

I've prepared a new release. Kudos to @EtiolEhomba for the fix!

ildar170975 commented 3 months ago

@syssi Can you please check my https://github.com/syssi/xiaomi_airpurifier/pull/360 ?