Skip to content

Conversation

@AnonymousRetard
Copy link

Fixes multiple calls to _async_enter_summer_house_mode overwriting stored_data
Fixes issue #368

Not well tested yet but I'm currently testing it and it should work based on my previous change which did work.

There might be an even better fix though (maybe "changing" to a setting which is already the same as the currently active one could/should be blocked even higher up?).

What I have tested for more than two weeks is this:

diff --git a/custom_components/panasonic_cc/climate.py b/custom_components/panasonic_cc/climate.py
index 6aae437..6de4688 100644
--- a/custom_components/panasonic_cc/climate.py
+++ b/custom_components/panasonic_cc/climate.py
@@ -316,20 +316,11 @@ class PanasonicClimateEntity(PanasonicDataEntity, ClimateEntity):
         self._attr_max_temp = 30
         if not self.coordinator.device.in_summer_house_mode:
             return
-        stored_data = await self.coordinator.async_get_stored_data()
-        try:
-            hvac_mode = constants.OperationMode(stored_data['mode']) if 'mode' in stored_data else constants.OperationMode.Heat
-        except:
-            hvac_mode = constants.OperationMode.Heat
-        try:
-            eco_mode = constants.EcoMode(stored_data['ecoMode']) if 'ecoMode' in stored_data else constants.EcoMode.Auto
-        except:
-            eco_mode = constants.EcoMode.Auto
-        target_temperature = stored_data['targetTemperature'] if 'targetTemperature' in stored_data else 20
-        try:
-            fan_speed = constants.FanSpeed(stored_data['fanSpeed']) if 'fanSpeed' in stored_data else constants.FanSpeed.Auto
-        except:
-            fan_speed = constants.FanSpeed.Auto
+        hvac_mode = constants.OperationMode.Heat
+        eco_mode = constants.EcoMode.Auto
+        fan_speed = constants.FanSpeed.Auto
+        target_temperature = 20

         builder.set_hvac_mode(hvac_mode)
         builder.set_eco_mode(eco_mode)

That definately works, didn't get stuck in heat_8_15 a single time after this change. But then stored_data is not used at all and temperature and other settings are forced to their defaults instead of previous values when leaving summer_house_mode.

Alexander Arques added 2 commits October 12, 2025 16:35
The set_preset function always calls exit_summer_house mode so enter_summer_house mode must be allowed to re-run
@NilsJaburek
Copy link

I also have this annoying issue and would like to test your fix. How can I do this, is there a file to download now or will this be implemented in a regular update in near future?

Thanks!
Regards
Nils

@AnonymousRetard
Copy link
Author

Hopefully @sockless-coding will accept my pull request and make a release soon but he has not been active for quite a while so I have no idea when that will happen. But my fix is working great. To run it before sockless-coding makes a new release you would have to replace your /custom_components/panasonic_cc/climate.py b/custom_components/panasonic_cc/climate.py file with my version. Which you can view from clicking the tab "files changed" from here.

@NilsJaburek
Copy link

Hopefully @sockless-coding will accept my pull request and make a release soon but he has not been active for quite a while so I have no idea when that will happen. But my fix is working great. To run it before sockless-coding makes a new release you would have to replace your /custom_components/panasonic_cc/climate.py b/custom_components/panasonic_cc/climate.py file with my version. Which you can view from clicking the tab "files changed" from here.

Installed the fix, sees to work great. Thanks AnonymousRetard for your work!

Use local variable "device" instead of dereferencing self.coordinator.device again
@AnonymousRetard
Copy link
Author

Great to hear! From my end I have now been testing this for more than two weeks and it's been working perfectly for me.

I have an automation which triggers every time the lights in our garage change state and have remained in this state (on/off) for 2 minutes. It also triggers whenever my grouped sensor "minimum outdoor temp" changes (this avoids incorrect temperatures from any one sensor being really hot from being directly in the sun).

When lights are off the "minimum outdoor temp" decides whether heat pump should be off or in heat_8_15 preset (this is because the heat_8_15 preset runs the fan on high which is not necessary in the summer). When lights are on I have lots of branching rules deciding if pump should heat, cool or dry.

Because "minimum outdoor" temp can change quite often this automation runs quite a lot but most of the time it doesn't really change anything on the heat pump. I'm not sure if any actual API calls to the cloud are made when I set preset to "heat_8_15" while this is already the active preset but without my change here doing this is what causes the pump to get stuck in this mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants