aijayadams / hass-blueair

BlueAir sensor integration for HomeAssistant
34 stars 15 forks source link

[enhancement] Fan mode support #6

Closed aijayadams closed 2 years ago

aijayadams commented 2 years ago

Support switching between manual and automatic fan speed mode.

spikeygg commented 2 years ago

I may have found a bug in the implementation when playing around with the fan controls. When I set the fan speed to 0% and let it settle there and then use the switch to try to turn it back on it generates an error: failed to call turn_on, turn_on() got an unexpected keyword argument 'speed'. I think implementing a switch to control auto/manual separate from the speed slider would solve that issue.

aijayadams commented 2 years ago

Ah yes! I noticed that mistake too - I think I corrected it when moving to the async methods... but if it's still there please let me know.

I incorrectly interpreted the note on FanEntity about speed being deprecated as an indication that I didn't need to support it, but the turn-on method seems to get called with both speed and percentage arguments so I just added a **kwargs to swallow it all.