ha-warmup/warmup

HA warning: ClimateDevice is deprecated, modify WarmupThermostat to extend ClimateEntity

Closed this issue · 6 comments

rct commented

Home Assistant warning on the warmup component: ClimateDevice is deprecated, modify WarmupThermostat to extend ClimateEntity

I didn't see this mentioned in any other issues. So far I haven't found any mention for if/when ClimateDevice would be removed. Often, the removal happens at some point in the future after deprecation warning.

artmg commented

This was 'announced' back in May, although some more mainstream integrations also appear to have heard about it late. The dev docs are in

https://developers.home-assistant.io/docs/core/entity/climate/

so I guess it's a case of assessing the difference between those Methods and Properties, and the ones we have currently. I'm not sure how much development and testing resource we have available at the moment. I'm somewhat rusty on the code side, but I can have a go.

Any updates on this? love having the ability control my warmup floor in HA. I just wish i could help but its way beyond me.. (i can send cakes if that helps?)

I have installed your add-on today and by editing the text 'ClimateDevice' to 'ClimateEntity' in the two places it occurs in climate.py - all seems well.

There is another error though related to a version key in the manifest(?) - sounds like a straight forward feature to add?

artmg commented

Hi @dizzi77 many thanks for trying out this workaround. It would be great if you could raise a Pull Request (PR), but please let me know if you can't. Unfortunately I don't have a way of testing these changes, as I have not managed to keep up with the latest HA versions on my own instance.

Do you have more details on the version error?

We really appreciate your contributions.

Hi @artmg - I am a complete newbie so expect the unexpected.

I have forked the repository, edited climate.py and attempted a pull request. Not sure if this worked.

I have tested the changes on a fresh install of HA (RPI3, standard HA os supervised install) and it appears to work with no errors.

artmg commented

Thanks for your effort with this @dizzi77 and your courage :)
So the Pull Request (PR) was from your 'remote' where you changed the code on your PC to your fork. Now you want to go into and raise a PR against this 'upstream repo'

Screenshot 2021-03-17 at 19 25 57

You can see the button for the new Pull Request in that special bar across the top of the file listing.

Good luck!