Support auto as Dyson fan on device state (#44472)

* - Make the dyson integration report that the fan is on if its in AUTO or FAN states instead of only in FAN state

* - Fix code style issue to be compliant with flake8
This commit is contained in:
Nick 2020-12-25 08:49:14 -05:00 committed by GitHub
parent 6f2ed86c49
commit 9a5132054f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -257,7 +257,7 @@ class DysonPureCoolLinkDevice(FanEntity):
def is_on(self):
"""Return true if the entity is on."""
if self._device.state:
return self._device.state.fan_mode == "FAN"
return self._device.state.fan_mode in ["FAN", "AUTO"]
return False
@property