File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,8 @@ def _get_location_data(self, loc_id: str) -> GwEntityData:
155155 """
156156 zone = self ._zones [loc_id ]
157157 data = self ._get_zone_data (loc_id )
158+ self ._regulation_control (data )
159+
158160 data ["control_state" ] = "idle"
159161 self ._count += 1
160162 if (ctrl_state := self ._control_state (data )) and ctrl_state in (
Original file line number Diff line number Diff line change @@ -791,9 +791,9 @@ def _rank_thermostat(
791791 thermo_loc ["secondary" ].append (appliance_id )
792792
793793 def _control_state (self , data : GwEntityData ) -> str | bool :
794- """Helper-function for _get_adam_data ().
794+ """Helper-function for _get_location_data ().
795795
796- Adam: find the thermostat control_state of a location, from DOMAIN_OBJECTS .
796+ Adam: collect the thermostat control_state of a location.
797797 Represents the heating/cooling demand-state of the local primary thermostat.
798798 Note: heating or cooling can still be active when the setpoint has been reached.
799799 """
@@ -834,6 +834,15 @@ def _heating_valves(self) -> int | bool:
834834
835835 return False if loc_found == 0 else open_valve_count
836836
837+ def _regulation_control (self , data : GwEntityData ) -> None :
838+ """Helper-function for smile.py: _get_location_data().
839+
840+ Adam: collect the thermostat regulation_mode of a location.
841+ """
842+ data ["regulation_control_modes" ] = ["active" , "passive" , "off" ]
843+ data ["select_regulation_control" ] = data ["thermostat" ]["regulation_control" ]
844+ data ["thermostat" ].pop ("regulation_control" )
845+
837846 def _preset (self , loc_id : str ) -> str | None :
838847 """Helper-function for smile.py: device_data_climate().
839848
You can’t perform that action at this time.
0 commit comments