@@ -798,6 +798,8 @@ def _update_elga_cooling(self, data: GwEntityData) -> None:
798798 # Techneco Elga has cooling-capability
799799 self ._cooling_present = True
800800 data ["model" ] = "Generic heater/cooler"
801+ # Cooling_enabled in xml does NOT show the correct status!
802+ # Setting it specifically:
801803 self ._cooling_enabled = data ["binary_sensors" ]["cooling_enabled" ] = data ["elga_status_code" ] in (8 , 9 )
802804 data ["binary_sensors" ]["cooling_state" ] = self ._cooling_active = (
803805 data ["elga_status_code" ] == 8
@@ -812,11 +814,13 @@ def _update_elga_cooling(self, data: GwEntityData) -> None:
812814
813815 def _update_loria_cooling (self , data : GwEntityData ) -> None :
814816 """Loria/Thermastage: base cooling-related on cooling_state and modulation_level."""
815- self ._cooling_enabled = data ["binary_sensors" ]["cooling_state" ]
817+ # For Loria/Thermastage it's not clear if cooling_enabled in xml shows the correct status,
818+ # setting it specifically:
819+ self ._cooling_enabled = data ["binary_sensors" ]["cooling_enabled" ] = data ["binary_sensors" ]["cooling_state" ]
816820 self ._cooling_active = data ["sensors" ]["modulation_level" ] == 100
817821 # For Loria the above does not work (pw-beta issue #301)
818822 if "cooling_ena_switch" in data ["switches" ]:
819- self ._cooling_enabled = data ["switches" ]["cooling_ena_switch" ]
823+ self ._cooling_enabled = data ["binary_sensors" ][ "cooling_enabled" ] = data [ " switches" ]["cooling_ena_switch" ]
820824 self ._cooling_active = data ["binary_sensors" ]["cooling_state" ]
821825
822826 def _cleanup_data (self , data : GwEntityData ) -> None :
0 commit comments