diff --git a/pyvlx/__init__.py b/pyvlx/__init__.py index 44798147..c4c92405 100644 --- a/pyvlx/__init__.py +++ b/pyvlx/__init__.py @@ -4,7 +4,7 @@ from .lightening_device import Light, LighteningDevice from .nodes import Nodes from .opening_device import ( - Blade, Blind, GarageDoor, OpeningDevice, RollerShutter, Window) + Blade, Blind, GarageDoor, Gate, OpeningDevice, RollerShutter, Window) from .parameter import ( CurrentIntensity, CurrentPosition, Intensity, Parameter, Position, SwitchParameter, SwitchParameterOff, SwitchParameterOn, UnknownIntensity, diff --git a/pyvlx/node_helper.py b/pyvlx/node_helper.py index 6cff3012..bf05e594 100644 --- a/pyvlx/node_helper.py +++ b/pyvlx/node_helper.py @@ -4,7 +4,7 @@ from .log import PYVLXLOG from .on_off_switch import OnOffSwitch from .opening_device import ( - Awning, Blade, Blind, GarageDoor, RollerShutter, Window) + Awning, Blade, Blind, GarageDoor, Gate, RollerShutter, Window) def convert_frame_to_node(pyvlx, frame): @@ -29,6 +29,10 @@ def convert_frame_to_node(pyvlx, frame): return OnOffSwitch(pyvlx=pyvlx, node_id=frame.node_id, name=frame.name) if frame.node_type == NodeTypeWithSubtype.GARAGE_DOOR_OPENER: return GarageDoor(pyvlx=pyvlx, node_id=frame.node_id, name=frame.name) + if frame.node_type == NodeTypeWithSubtype.GATE_OPENER: + return Gate(pyvlx=pyvlx, node_id=frame.node_id, name=frame.name) + if frame.node_type == NodeTypeWithSubtype.GATE_OPENER_ANGULAR_POSITION: + return Gate(pyvlx=pyvlx, node_id=frame.node_id, name=frame.name) if frame.node_type == NodeTypeWithSubtype.BLADE_OPENER: return Blade(pyvlx=pyvlx, node_id=frame.node_id, name=frame.name) if frame.node_type == NodeTypeWithSubtype.LIGHT: diff --git a/pyvlx/opening_device.py b/pyvlx/opening_device.py index 944c5e9b..556871ab 100644 --- a/pyvlx/opening_device.py +++ b/pyvlx/opening_device.py @@ -120,6 +120,8 @@ class RollerShutter(OpeningDevice): class GarageDoor(OpeningDevice): """GarageDoor object.""" +class Gate(OpeningDevice): + """Gate object.""" class Blade(OpeningDevice): """Blade object."""