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.75k stars 417 forks source link

Fix Hass 2024.2 climate entity deprecation #1341

Closed Soltinioo closed 9 months ago

Soltinioo commented 9 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 9 months ago

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

Soltinioo commented 9 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 9 months ago

Please show device diagnostics

Soltinioo commented 9 months ago

sonoff-d6127c3e6345e5772ea3df263b78e947-Spiżarnia-f51f9681fc3fc59a4e1c4d21e05874ea.json

AlexxIT commented 9 months ago

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

Soltinioo commented 9 months ago

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

RealLord commented 9 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 9 months ago

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

AlexxIT commented 9 months ago

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