You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This custom integration uses deprecated DEVICE_CLASS_* constants in its codebase.
The DEVICE_CLASS_* constants have been deprecated and replaced in Home Assistant Core 2021.12 (over a year ago). I would highly suggest updating/migrating this integration to the new enums.
For example, for the device classes supported by the sensor platform, there is now a SensorDeviceClass enum. So if a sensor previously used the DEVICE_CLASS_ENERGY constant, it should now use SensorDeviceClass.ENERGY. Other platforms (like binary_sensor, and number) provide similar enumerations for their supported device classes.
The migration thus only consists of replacing constants with an enumeration member and is, therefore, very low impact and should be fairly straightforward.
If I can help resolve any questions regarding this change or migration, feel free to ask or respond to this issue. I'm happy to help!
Kindest regards,
../Frenck
The text was updated successfully, but these errors were encountered:
ws
added a commit
to ws/hass-tryfi
that referenced
this issue
Jul 31, 2023
Please include DEVICE_CLASS_BATTERY was used from tryfi, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.BATTERY instead
This custom integration uses deprecated
DEVICE_CLASS_*
constants in its codebase.The
DEVICE_CLASS_*
constants have been deprecated and replaced in Home Assistant Core 2021.12 (over a year ago). I would highly suggest updating/migrating this integration to the new enums.For example, for the device classes supported by the
sensor
platform, there is now aSensorDeviceClass
enum. So if a sensor previously used theDEVICE_CLASS_ENERGY
constant, it should now useSensorDeviceClass.ENERGY
. Other platforms (likebinary_sensor
, andnumber
) provide similar enumerations for their supported device classes.The migration thus only consists of replacing constants with an enumeration member and is, therefore, very low impact and should be fairly straightforward.
If I can help resolve any questions regarding this change or migration, feel free to ask or respond to this issue. I'm happy to help!
Kindest regards,
../Frenck
The text was updated successfully, but these errors were encountered: