prusa_mini_home_assistant icon indicating copy to clipboard operation
prusa_mini_home_assistant copied to clipboard

Temperature sensors not inheriting SensorEntity warning in HA 2022.4

Open iridris opened this issue 3 years ago • 2 comments

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:

  1. Update to HA 2022.4
  2. View logs
  3. 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.

iridris avatar Apr 06 '22 13:04 iridris

Thanks for letting me know! I'll fix it when I have some free time...

sq3tle avatar Apr 06 '22 14:04 sq3tle

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.

iridris avatar Apr 15 '22 01:04 iridris