Skip to content

Commit de1a455

Browse files
authored
Merge pull request #298 from cdnninja/humidState
fix: Humidifier Screen incorrect
2 parents 3bb349d + 67a65e9 commit de1a455

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/pyvesync/vesyncfan.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2210,13 +2210,7 @@ def turn_off_display(self):
22102210
@property
22112211
def display_state(self) -> bool:
22122212
"""Get display state."""
2213-
# The field 'display' is defined both on 'config' (in build_config_dict) and
2214-
# 'details' (in build_humid_dict). get_details first calls build_humid_dict
2215-
# and then build_config_dict if the result has configuration populated. Based
2216-
# on this, the values in cofig seem to be an override. We will first check
2217-
# config and then fall back to details
2218-
value = self.config.get('display', None)
2219-
return self.details.get('display', False) if value is None else value
2213+
return bool(self.details['display'])
22202214

22212215
def set_humidity(self, humidity: int) -> bool:
22222216
"""Set target 200S/300S Humidifier humidity."""

0 commit comments

Comments
 (0)