File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -798,7 +798,7 @@ def _control_state(self, data: GwEntityData) -> str | bool:
798798 Note: heating or cooling can still be active when the setpoint has been reached.
799799 """
800800
801- if (ctrl_state := data ["thermostat" ][ "control_state" ] ) is not None :
801+ if (ctrl_state := data ["thermostat" ]. get ( "control_state" ) ) is not None :
802802 data ["thermostat" ].pop ("control_state" )
803803 return ctrl_state
804804
@@ -839,9 +839,10 @@ def _regulation_control(self, data: GwEntityData) -> None:
839839
840840 Adam: collect the thermostat regulation_mode of a location.
841841 """
842- data ["regulation_control_modes" ] = ["active" , "passive" , "off" ]
843- data ["select_regulation_control" ] = data ["thermostat" ]["regulation_control" ]
844- data ["thermostat" ].pop ("regulation_control" )
842+ if (reg_control := data ["thermostat" ].get ("regulation_control" )) is not None :
843+ data ["select_regulation_control" ] = reg_control
844+ data ["regulation_control_modes" ] = ["active" , "passive" , "off" ]
845+ data ["thermostat" ].pop ("regulation_control" )
845846
846847 def _preset (self , loc_id : str ) -> str | None :
847848 """Helper-function for smile.py: device_data_climate().
You can’t perform that action at this time.
0 commit comments