krahabb / meross_lan

Home Assistant integration for Meross devices
MIT License
450 stars 47 forks source link

Add control for Summer Mode on MTS200 #468

Closed yllwfsh closed 4 months ago

yllwfsh commented 4 months ago

Dear maintainers,

Any chance you could add a control/switch in the integration for the 'Summer Mode' of the MTS200? I've added a diagnostic file for one of my thermostats. In the file it shows as 'Appliance.Control.Thermostat.SummerMode'

Thank you!

meross_lan-0cbeaa295ae67cb186bf59903d332ed9-Living Room-e3f7fdfa50d6d841cef0283a755cdb8f.json

krahabb commented 4 months ago

Sure, Currently it should be supported by setting the HVAC mode to cooling...does it work ? I'll anyway check the 'state of the art' by testing with your trace... keep in touch

yllwfsh commented 4 months ago

Hi @krahabb,

Thanks for the swift reply! Currently the integration doesn't switch on the Summer mode when switching to Cooling. It does switch it off though when changing to Heating. Does that make sense?

yllwfsh commented 4 months ago

I've also created two other dumps to help diagnose the problem better, one is with summer mode on, and the other with summer mode off:

summer_off.json summer_on.json

yllwfsh commented 4 months ago

I think I figured it out by looking through your code!

https://github.com/krahabb/meross_lan/blob/85a576d4018f060463b0c87533d9b1e5ebd35c6c/custom_components/meross_lan/merossclient/const.py#L435

On that line the constant for cooling is defined as '0' but in my dumps I saw that Cooling/Summer Mode should be '2'.

I've changed the value to '2' in my custom_components folder and it works!

So in that case no more need for a separate switch for the Summer Mode, this would probably only be confusing.

krahabb commented 4 months ago

Wow! Thank you very much..I love people who are so proactive! I remember summer mode was signaled and somehow reverse engineered by another user but then the summer season was off and the implementation was never thoroughly confirmed.

I'll fix the constant in the code base rightaway ;)

yllwfsh commented 4 months ago

When you said it should have worked with the HVAC mode it triggered me to try to look into the code.

I'm happy I found this one to be honest. I'm a terrible coder but can follow it a bit ;)

Thanks for all the great work on this integration!