prusa_mini_home_assistant
prusa_mini_home_assistant copied to clipboard
Temperature sensors not inheriting SensorEntity warning in HA 2022.4
Describe the bug Starting with HA 2022.4 release, log entries are listed on HA startup stating that a couple of the temperature sensors are not inheriting SensorEntity, which will be unsupported starting in HA 2022.7.
To Reproduce Steps to reproduce the behavior:
- Update to HA 2022.4
- View logs
- See the warning message about the temperature sensors.
Expected behavior No warnings.
Screenshots
Server:
- OS: HA OS
- HA: core 2022.4.b6
- docker?: no
Additional context Logs:
Temperature sensor sensor.prusa_mini_temp_nozzle (<class 'custom_components.prusa_connect.sensor.PrusaSensor'>) does not inherit SensorEntity, this will be unsupported in Home Assistant Core 2022.7.Please report it to the custom component author.
Temperature sensor sensor.prusa_mini_temp_bed (<class 'custom_components.prusa_connect.sensor.PrusaSensor'>) does not inherit SensorEntity, this will be unsupported in Home Assistant Core 2022.7.Please report it to the custom component author.
Thanks for letting me know! I'll fix it when I have some free time...
I think this might be because the various temperature sensors are not declaring the "device class" property as being "temperature". But I'm not a developer, and don't know that for sure.
I think this would probably be set up in class PrusaSensor(Entity):, but again, I'm not a developer so I'm grasping at straws.