sampsyo / hass-smartthinq

Home Assistant component for LG SmartThinQ HVAC devices
MIT License
285 stars 98 forks source link

Update to support new entity naming convention? #54

Closed monsieurlatte closed 4 years ago

monsieurlatte commented 4 years ago

Just curious if you have plans on fixing this?

Logger: homeassistant.components.climate Source: components/climate/init.py:547 Integration: Climate (documentation, issues) First occurred: 7:29:06 PM (1 occurrences) Last logged: 7:29:06 PM

ClimateDevice is deprecated, modify LGDevice to extend ClimateEntity

sampsyo commented 4 years ago

That's the first I'm hearing of this deprecation! Yes, sounds good, let's address it—but it would be great to put it behind a version check so it's still possibly to use this component with older versions of HomeAssistant for a little while, until it ages out. Want to take a shot at that?

monsieurlatte commented 4 years ago

Here's the info, doesnt appear to cause issues with older versions of HA.
https://developers.home-assistant.io/blog/2020/05/14/entity-class-names

sampsyo commented 4 years ago

Great! That try/except would be the right way to preserve compatibility. Now accepting PRs if anyone has a moment to add that in!

monsieurlatte commented 4 years ago

So you're wanting one of us to update this code to fix this?

sampsyo commented 4 years ago

Yeah! Pull requests would be super helpful.

RomanSladecek commented 4 years ago

Pls anybody with update?

jsmath commented 4 years ago

Temporary fix: In climate.py, change ClimateDevice to ClimateEntity in one location. Restart home assistant.

Xitro01 commented 4 years ago

Temporary fix: In climate.py, change ClimateDevice to ClimateEntity in one location. Restart home assistant.

I tried this, but did not seem to work. I changed row 92: class LGDevice(climate.ClimateEntity):

Still getting errors that the climate entity is not available.

jsmath commented 4 years ago

Not sure, the above change fixed it for me. I'm assuming you had it working previously? Make sure you are on the latest home assistant version for this to work. (v 0.110 or later).

Xitro01 commented 4 years ago

Not sure, the above change fixed it for me. I'm assuming you had it working previously? Make sure you are on the latest home assistant version for this to work. (v 0.110 or later).

Yes, previously working until I updated to v0.110.7. I saw there was a new update so I'm now on v0.111, but still this issue after the change above: "SmartThinQ Error SmartThinQ device not available: AIRCONDITIONER"

Edit: Nevermind, somehow the Airconditioner seems to have completely lost it's wifi connection. Now up 'n running again!