File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -1029,12 +1029,13 @@ def _get_measurement_data(self, dev_id: str) -> DeviceData:
10291029 # Anna+Elga: base cooling_state on the elga-status-code
10301030 if "elga_status_code" in data :
10311031 # Determine _cooling_present and _cooling_enabled
1032- if (
1033- "cooling_enabled" in data ["binary_sensors" ]
1034- and data ["binary_sensors" ]["cooling_enabled" ]
1035- ):
1036- self ._cooling_present = self ._cooling_enabled = True
1032+ if "cooling_enabled" in data ["binary_sensors" ]:
1033+ self ._cooling_present = True
10371034 data ["model" ] = "Generic heater/cooler"
1035+ self ._cooling_enabled = False
1036+ if data ["binary_sensors" ]["cooling_enabled" ]:
1037+ self ._cooling_enabled = True
1038+
10381039 data ["binary_sensors" ]["cooling_state" ] = self ._cooling_active = (
10391040 data ["elga_status_code" ] == 8
10401041 )
You can’t perform that action at this time.
0 commit comments