Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
crazyfx1 committed Jan 25, 2021
1 parent 94fa07b commit bcc5792
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/fan.md
Expand Up @@ -18,7 +18,7 @@ Fans are simple representations of KNX controlled fans. They support setting the
- `group_address` is the KNX group address of the fan device. Used for sending.
- `group_address_state` is the KNX group address of the fan state. Used for updating and reading state.
- `device_updated_cb` awaitable callback for each update.
- `mode` Enum for the type of the fan control. Can be *Percentage* or *Step*. Default: FanSpeedMode.Percentage
- `mode` Enum for the type of the fan control. Can be *Percent* or *Step*. Default: FanSpeedMode.Percent

## [](#header-2)Example

Expand Down
6 changes: 3 additions & 3 deletions xknx/devices/fan.py
Expand Up @@ -26,11 +26,11 @@
class FanSpeedMode(Enum):
"""Enum for setting the fan speed mode."""

Percentage = 1
Percent = 1
Step = 2


DEFAULT_MODE = FanSpeedMode.Percentage
DEFAULT_MODE = FanSpeedMode.Percent


class Fan(Device):
Expand All @@ -46,7 +46,7 @@ def __init__(
group_address_speed: Optional["GroupAddressableType"] = None,
group_address_speed_state: Optional["GroupAddressableType"] = None,
device_updated_cb: Optional[DeviceCallbackType] = None,
mode: Optional[FanSpeedMode] = DEFAULT_MODE,
mode: FanSpeedMode = DEFAULT_MODE,
):
"""Initialize fan class."""
# pylint: disable=too-many-arguments
Expand Down

0 comments on commit bcc5792

Please sign in to comment.