From bcc5792ef50ee22edf69cae5f8329755ee101f92 Mon Sep 17 00:00:00 2001 From: crazyfx1 Date: Mon, 25 Jan 2021 20:31:16 +0100 Subject: [PATCH] PR feedback --- docs/fan.md | 2 +- xknx/devices/fan.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/fan.md b/docs/fan.md index 58fd923de..20df99c6d 100644 --- a/docs/fan.md +++ b/docs/fan.md @@ -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 diff --git a/xknx/devices/fan.py b/xknx/devices/fan.py index 61fa62db0..a00ca0552 100644 --- a/xknx/devices/fan.py +++ b/xknx/devices/fan.py @@ -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): @@ -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