doudz / homeassistant-zigate

zigate component for Home Assistant
MIT License
48 stars 15 forks source link

fix deprecated entities #120

Closed MichaelBitard closed 4 years ago

MichaelBitard commented 4 years ago

Will fix these messages

2020-06-04 18:28:09 WARNING (MainThread) [homeassistant.components.binary_sensor] BinarySensorDevice is deprecated, modify ZiGateBinarySensor to extend BinarySensorEntity                                                                     
2020-06-04 18:28:10 WARNING (MainThread) [homeassistant.components.switch] SwitchDevice is deprecated, modify ZiGateSwitch to extend SwitchEntity                                                                                              
2020-06-04 18:28:10 WARNING (MainThread) [homeassistant.components.light] Light is deprecated, modify ZiGateLight to extend LightEntity                                                                                                        
2020-06-04 18:28:11 WARNING (MainThread) [homeassistant.components.cover] CoverDevice is deprecated, modify ZiGateCover to extend CoverEntity                                                                                                  
2020-06-04 18:28:11 WARNING (MainThread) [homeassistant.components.climate] ClimateDevice is deprecated, modify ZigateClimate to extend ClimateEntity 
MichaelBitard commented 4 years ago

On my previous PR #118 there was an easy way to keep retro-compatibility. I don't think there is one here.

IMHO, we should always be up to date anyway, what do you think?

MichaelBitard commented 4 years ago

I see travis is failing on python 3.5 and 3.6, but when I look here:

it says Requires: Python >=3.7.0

So what should I do? Should I remove python 3.5 and 3.6 tests?

doudz commented 4 years ago

We should follow Home Assistant Core requirements and drop python 3.5 and 3.6 support https://github.com/home-assistant/core/pull/29978

doudz commented 4 years ago

Looks good, did you test it in prod ?

MichaelBitard commented 4 years ago

Yes, I did that on my machine, the warnings are not there anymore, and everything works

doudz commented 4 years ago

Thanks a lot !

MichaelBitard commented 4 years ago

You're welcome, thanks for your amazing work here