-
-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change speed type of FanSpeedEvent (#281)
* change speed type of FanSpeedEvent * adjust fan speed tests
- Loading branch information
Showing
4 changed files
with
30 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
"""Fan speed event module.""" | ||
|
||
|
||
from dataclasses import dataclass | ||
|
||
from ..util import DisplayNameIntEnum | ||
from .base import Event | ||
|
||
|
||
class FanSpeedLevel(DisplayNameIntEnum): | ||
"""Enum class for all possible fan speed levels.""" | ||
|
||
# Values should be sort from low to high on their meanings | ||
QUIET = 1000 | ||
NORMAL = 0 | ||
MAX = 1 | ||
MAX_PLUS = 2 | ||
|
||
|
||
@dataclass(frozen=True) | ||
class FanSpeedEvent(Event): | ||
"""Fan speed event representation.""" | ||
|
||
speed: FanSpeedLevel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters