AlexxIT / SonoffLAN

Control Sonoff Devices with eWeLink (original) firmware over LAN and/or Cloud from Home Assistant
https://github.com/AlexxIT/Blog
MIT License
2.58k stars 405 forks source link

Fix Hass 2024.2 climate entity deprecation #1341

Closed sebastiangebosz closed 4 months ago

sebastiangebosz commented 4 months ago

Hi. After the update, I have a warning in the log. Everything works ok. Thanks for your work

Logger: homeassistant.components.climate Source: components/climate/init.py:354 Integration: Klimat (documentation, issues) First occurred: 14:12:12 (2 occurrences) Last logged: 14:12:12

Entity sonoff.sonoff_1000e5a55c (<class 'custom_components.sonoff.climate.XClimateTH'>) implements HVACMode(s): off, heat, cool, dry and therefore implicitly supports the turn_on/turn_off methods without setting the proper ClimateEntityFeature. Please create a bug report at https://github.com/AlexxIT/SonoffLAN/issues Entity sonoff.sonoff_1000e5a54f (<class 'custom_components.sonoff.climate.XClimateTH'>) implements HVACMode(s): off, heat, cool, dry and therefore implicitly supports the turn_on/turn_off methods without setting the proper ClimateEntityFeature. Please create a bug report at https://github.com/AlexxIT/SonoffLAN/issues

AlexxIT commented 4 months ago

Correct message - please check that you are using the latest version of the component

sebastiangebosz commented 4 months ago

Correct message - please check that you are using the latest version of the component

I use version SonoffLAN v3.5.4 Core 2024.2.0 Supervisor 2024.01.1 Operating System 11.5

Firmware of TH16R2 : 3.5.0

previously, before the update to HA 2024.02, this information was not in the log

AlexxIT commented 4 months ago

Please show device diagnostics

sebastiangebosz commented 4 months ago

sonoff-d6127c3e6345e5772ea3df263b78e947-Spiżarnia-f51f9681fc3fc59a4e1c4d21e05874ea.json

AlexxIT commented 4 months ago

I can see you using latest version. Are you sure you have this warning with this version?

sebastiangebosz commented 4 months ago

Yes. It showed after updating to 2024.2.0. There was no warning before

RealLord commented 4 months ago

@AlexxIT If you can defeat this alert, can you explain what are you doing for this? I have the same warning in another climate integration, i was implemented all needed methods, but warning still present. And this issue doesn't have clear explanation in documentation. Adding this into integraton doesn't disable warning:

    def turn_on(self) -> None:
        pass
    def turn_off(self) -> None:
        pass
AlexxIT commented 4 months ago

https://developers.home-assistant.io/blog/2024/01/24/climate-climateentityfeatures-expanded

AlexxIT commented 4 months ago

https://github.com/AlexxIT/SonoffLAN/releases/tag/v3.6.0