ksya / ha-nefiteasy

Nefit Easy connection for Home Assistant
74 stars 30 forks source link

Use of deprecated constants #288

Open AdeZwart opened 5 months ago

AdeZwart commented 5 months ago

Today I've upgraded my home assistant to the latest 2024.1 version and it starts warning about the usage of deprecated constants.

2024-01-04 07:59:05.143 WARNING (MainThread) [homeassistant.components.sensor] STATE_CLASS_MEASUREMENT was used from nefiteasy, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorStateClass.MEASUREMENT instead, please create a bug report at https://github.com/ksya/ha-nefiteasy/issues
2024-01-04 07:59:05.151 WARNING (MainThread) [homeassistant.components.sensor] STATE_CLASS_TOTAL_INCREASING was used from nefiteasy, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorStateClass.TOTAL_INCREASING instead, please create a bug report at https://github.com/ksya/ha-nefiteasy/issues
2024-01-04 07:59:05.159 WARNING (MainThread) [homeassistant.components.sensor] STATE_CLASS_MEASUREMENT was used from nefiteasy, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorStateClass.MEASUREMENT instead, please create a bug report at https://github.com/ksya/ha-nefiteasy/issues
2024-01-04 07:59:05.165 WARNING (MainThread) [homeassistant.components.sensor] STATE_CLASS_TOTAL_INCREASING was used from nefiteasy, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorStateClass.TOTAL_INCREASING instead, please create a bug report at https://github.com/ksya/ha-nefiteasy/issues
2024-01-04 07:59:05.174 WARNING (MainThread) [homeassistant.const] PRESSURE_BAR was used from nefiteasy, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfPressure.BAR instead, please create a bug report at https://github.com/ksya/ha-nefiteasy/issues
2024-01-04 07:59:05.181 WARNING (MainThread) [homeassistant.const] TEMP_CELSIUS was used from nefiteasy, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.CELSIUS instead, please create a bug report at https://github.com/ksya/ha-nefiteasy/issues
2024-01-04 07:59:05.187 WARNING (MainThread) [homeassistant.const] VOLUME_CUBIC_METERS was used from nefiteasy, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfVolume.CUBIC_METERS instead, please create a bug report at https://github.com/ksya/ha-nefiteasy/issues
2024-01-04 07:59:13.313 WARNING (MainThread) [homeassistant.components.climate.const] CURRENT_HVAC_HEAT was used from nefiteasy, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACAction.HEATING instead, please create a bug report at https://github.com/ksya/ha-nefiteasy/issues
2024-01-04 07:59:13.320 WARNING (MainThread) [homeassistant.components.climate.const] CURRENT_HVAC_IDLE was used from nefiteasy, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACAction.IDLE instead, please create a bug report at https://github.com/ksya/ha-nefiteasy/issues
2024-01-04 07:59:13.329 WARNING (MainThread) [homeassistant.components.climate.const] HVAC_MODE_HEAT was used from nefiteasy, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.HEAT instead, please create a bug report at https://github.com/ksya/ha-nefiteasy/issues
2024-01-04 07:59:13.338 WARNING (MainThread) [homeassistant.components.climate.const] SUPPORT_PRESET_MODE was used from nefiteasy, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.PRESET_MODE instead, please create a bug report at https://github.com/ksya/ha-nefiteasy/issues
2024-01-04 07:59:13.348 WARNING (MainThread) [homeassistant.components.climate.const] SUPPORT_TARGET_TEMPERATURE was used from nefiteasy, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.TARGET_TEMPERATURE instead, please create a bug report at https://github.com/ksya/ha-nefiteasy/issues
2024-01-04 07:59:13.356 WARNING (MainThread) [homeassistant.const] TEMP_CELSIUS was used from nefiteasy, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.CELSIUS instead, please create a bug report at https://github.com/ksya/ha-nefiteasy/issues

The constants will be removed in a year in version 2025.1

bschokker commented 5 months ago

For what it's worth, here my log:

Logger: homeassistant.helpers.entity Source: helpers/entity.py:1520 First occurred: 13:55:22 (1 occurrences) Last logged: 13:55:22

Entity None (<class 'custom_components.nefiteasy.climate.NefitThermostat'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <ClimateEntityFeature.TARGET_TEMPERATURE|PRESET_MODE: 17>, please create a bug report at https://github.com/ksya/ha-nefiteasy/issues and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation

bsimmo commented 5 months ago

Same here obviously

RobBie1221 commented 5 months ago

Thanks for pointing it out. That needs an update before 2025.1 (still some time left).