-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #56 from icommitdesnet/master
Klf200 class with new frames, reorganisation of files
- Loading branch information
Showing
133 changed files
with
1,990 additions
and
496 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,21 @@ | ||
"""Module for all KLF 200 API frames.""" | ||
# flake8: noqa | ||
|
||
from .house_status_monitor import (house_status_monitor_enable) | ||
from .command_send import (CommandSend) | ||
from .get_local_time import (FrameGetLocalTimeRequest, FrameGetLocalTimeConfirmation) | ||
from .get_state import (GetState) | ||
from .get_network_setup import (GetNetworkSetup) | ||
from .get_protocol_version import (GetProtocolVersion) | ||
from .get_version import (GetVersion) | ||
from .get_local_time import (GetLocalTime) | ||
from .leave_learn_state import (LeaveLearnState) | ||
from .factory_default import (FactoryDefault) | ||
from .password_enter import (PasswordEnter) | ||
from .set_utc import (SetUTC) | ||
from .reboot import (Reboot) | ||
from .activate_scene import (ActivateScene) | ||
from .set_node_name import (SetNodeName) | ||
from .get_all_nodes_information import (GetAllNodesInformation) | ||
from .get_node_information import (GetNodeInformation) | ||
from .get_scene_list import (GetSceneList) |
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
File renamed without changes.
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,26 @@ | ||
"""Module for handling the FactoryDefault to API.""" | ||
from pyvlx.log import PYVLXLOG | ||
from .api_event import ApiEvent | ||
from .frames import FrameGatewayFactoryDefaultConfirmation, FrameGatewayFactoryDefaultRequest | ||
|
||
|
||
class FactoryDefault(ApiEvent): | ||
"""Class for handling Factory reset API.""" | ||
|
||
def __init__(self, pyvlx): | ||
"""Initialize facotry default class.""" | ||
super().__init__(pyvlx=pyvlx) | ||
self.pyvlx = pyvlx | ||
self.success = False | ||
|
||
async def handle_frame(self, frame): | ||
"""Handle incoming API frame, return True if this was the expected frame.""" | ||
if isinstance(frame, FrameGatewayFactoryDefaultConfirmation): | ||
PYVLXLOG.warning("KLF200 is factory resetting") | ||
self.success = True | ||
return True | ||
return False | ||
|
||
def request_frame(self): | ||
"""Construct initiating frame.""" | ||
return FrameGatewayFactoryDefaultRequest() |
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
File renamed without changes.
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
File renamed without changes.
Oops, something went wrong.