-
Notifications
You must be signed in to change notification settings - Fork 20
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
Integration is using deprecated DEVICE_CLASS_*
constants
#36
Comments
Hey Frenck, I just got the wifi module yesterday. I also just updated home assistant this morning but I keep getting this error message every-time i try to integrate it: Error I am fairly new to home assistant so your description above regarding enums is kind of foreign to me lol |
@Manbearpig92 My report has probably nothing to do with what you are looking for / asking for. My issue report is about the integration internals (the actual code), which isn't broken but does use some outdated features (which, again, aren't broken at this point). If you have an issue, please I suggest you create a new one :) ../Frenck |
Oh yeah you're right. I did manage to get it integrated. Were you able to expose the light and pump speed to HA? |
1 similar comment
Oh yeah you're right. I did manage to get it integrated. Were you able to expose the light and pump speed to HA? |
Good morning @frenck,
|
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: