-
-
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.
add advanced mode, break point (continuous cleaning), carpet pressure…
… commands (#24) * add advanced mode commands * add advanced mode to EVENT_DTO_REFRESH_COMMANDS * create generic enabled commands * add break point (continuous cleaning) command * add carpet pressure commands * use also break point as event too * rename enable event/commands * rename break point * rename carpet pressure * rename carpet pressure
- Loading branch information
Showing
8 changed files
with
141 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
"""Advanced mode command module.""" | ||
|
||
from ..events import AdvancedModeEvent | ||
from .common import SetEnableCommand, _GetEnableCommand | ||
|
||
|
||
class GetAdvancedMode(_GetEnableCommand): | ||
"""Get advanced mode command.""" | ||
|
||
name = "getAdvancedMode" | ||
event_type = AdvancedModeEvent | ||
|
||
|
||
class SetAdvancedMode(SetEnableCommand): | ||
"""Set advanced mode command.""" | ||
|
||
name = "setAdvancedMode" | ||
get_command = GetAdvancedMode |
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,18 @@ | ||
"""Carpet pressure command module.""" | ||
|
||
from ..events import CarpetAutoFanBoostEvent | ||
from .common import SetEnableCommand, _GetEnableCommand | ||
|
||
|
||
class GetCarpetAutoFanBoost(_GetEnableCommand): | ||
"""Get carpet auto fan boost command.""" | ||
|
||
name = "getCarpertPressure" | ||
event_type = CarpetAutoFanBoostEvent | ||
|
||
|
||
class SetCarpetAutoFanBoost(SetEnableCommand): | ||
"""Set carpet auto fan boost command.""" | ||
|
||
name = "setCarpertPressure" | ||
get_command = GetCarpetAutoFanBoost |
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,18 @@ | ||
"""Continuous cleaning (break point) command module.""" | ||
|
||
from ..events import ContinuousCleaningEvent | ||
from .common import SetEnableCommand, _GetEnableCommand | ||
|
||
|
||
class GetContinuousCleaning(_GetEnableCommand): | ||
"""Get continuous cleaning command.""" | ||
|
||
name = "getBreakPoint" | ||
event_type = ContinuousCleaningEvent | ||
|
||
|
||
class SetContinuousCleaning(SetEnableCommand): | ||
"""Set continuous cleaning command.""" | ||
|
||
name = "setBreakPoint" | ||
get_command = GetContinuousCleaning |
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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import inspect | ||
|
||
import deebot_client.events | ||
from deebot_client.events import Event | ||
from deebot_client.events import EnableEvent, Event | ||
from deebot_client.events.const import EVENT_DTO_REFRESH_COMMANDS | ||
|
||
|
||
def test_events_has_refresh_function(): | ||
for name, obj in inspect.getmembers(deebot_client.events, inspect.isclass): | ||
if issubclass(obj, Event) and obj != Event: | ||
if issubclass(obj, Event) and obj not in [Event, EnableEvent]: | ||
assert obj in EVENT_DTO_REFRESH_COMMANDS |