Skip to content

Commit

Permalink
fan speed mode percent if max_step is set to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
farmio committed Mar 20, 2021
1 parent 95ed8b9 commit d9fa977
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xknx/devices/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def __init__(
super().__init__(xknx, name, device_updated_cb)

self.speed: Union[RemoteValueDptValue1Ucount, RemoteValueScaling]
self.mode = FanSpeedMode.STEP if max_step is not None else FanSpeedMode.PERCENT
self.mode = FanSpeedMode.STEP if max_step else FanSpeedMode.PERCENT
self.max_step = max_step

if self.mode == FanSpeedMode.STEP:
Expand Down

0 comments on commit d9fa977

Please sign in to comment.