-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
POWER_WATT was used from amshan, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfPower.WATT instead #69
Comments
So, where/how do I change this? |
The values are assigned in sensor.py and field native_unit_of_measurement is the one getting warnings https://github.com/toreamun/amshan-homeassistant/blob/master/custom_components/amshan/sensor.py
Valid values are included from HA: so defined here: ... Power units
_DEPRECATED_POWER_WATT: Final = DeprecatedConstantEnum( Electric_current units
_DEPRECATED_ELECTRIC_CURRENT_MILLIAMPERE: Final = DeprecatedConstantEnum( and so on also for the other units. |
Here is a related one, total_increasing would be preferred. Logger: homeassistant.components.sensor Entity sensor.adn9_energy_active_negative (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using state class 'measurement' which is impossible considering device class ('energy') it is using; Entity sensor.adn9_energy_active_positive (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using state class 'measurement' which is impossible considering device class ('energy') it is using; |
Should be fixed in next release. |
When will that air on hacs? |
Warnings after upgrading to HA Core 2024.1.0 4.1.2024
Logger: homeassistant.const
Source: helpers/deprecation.py:204
First occurred: 17:51:09 (17 occurrences)
Last logged: 17:52:52
POWER_WATT was used from amshan, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfPower.WATT instead.
ELECTRIC_CURRENT_AMPERE was used from amshan, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfElectricCurrent.AMPERE instead.
ELECTRIC_POTENTIAL_VOLT was used from amshan, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfElectricPotential.VOLT instead.
ENERGY_KILO_WATT_HOUR was used from amshan, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfEnergy.KILO_WATT_HOUR instead.
The text was updated successfully, but these errors were encountered: