Equal
- class knx_plugin.trigger.Equal(description: Any, events: List[home.Event] = None)
A trigger triggered when
it has some ASAPs in common with the compared Description and
the knx_stack.datapointtypes.DPT described in the compared Description received from bus is equal to the knx_stack.datapointtypes.DPT described by the trigger
Example:
>>> import knx_stack >>> import knx_plugin >>> from knx_stack.datapointtypes import DPT_SceneControl >>> trigger = knx_plugin.trigger.dpt_scene_control.Activate.make( ... addresses=[knx_stack.GroupAddress(free_style=1234)], ... number=7) >>> trigger.dpt.number 7 >>> trigger.dpt.command == DPT_SceneControl.Command.activate True >>> address_table = knx_stack.AddressTable(knx_stack.Address(4097), [], 255) >>> association_table = knx_stack.AssociationTable(address_table, []) >>> groupobject_table = knx_stack.GroupObjectTable() >>> trigger.associate(association_table, groupobject_table) >>> from_bus = {"name": "DPT_SceneControl", ... "addresses": [1234], ... "fields": {"number": 1, "command": "activate"}} >>> another_description = knx_plugin.Description(from_bus) >>> another_description._asaps = [knx_stack.ASAP(1)] >>> trigger.is_triggered(another_description) False
DPT Switch
On
Off
DPT UpDown
Up
Down
DPT Start
Start
Stop
DPT Control Dimming
Step Up
Step Down
DPT Scene Control
Activate
- class knx_plugin.trigger.dpt_scene_control.Activate
- DPT = {'addresses': [], 'fields': {'command': 'activate', 'number': 0}, 'name': 'DPT_SceneControl', 'type': 'knx'}
- classmethod make()
Make a protocol message Description given the arguments.
- Parameters
args –
kwargs –
- Returns
a protocol message Description
- classmethod make_from_yaml()
Make a protocol message Description given the yaml arguments.
- Parameters
args –
kwargs –
- Returns
a protocol message Description