You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/developer_guide.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,17 +100,17 @@ A button can have the attribute autorepeat, an attribute that specifies the enti
100
100
If a button has the attribute **autorepeat**, the button declaration must also have a `value_function` attribute. The specified value function will be called for each autorepeat loop interation.
101
101
The meaning of the parameters of a button autorepeat value_function is:
102
102
103
-
* initval: either `BUTTONREPEAT_FIRST`, `BUTTONREPEAT_LOOP`, `BUTTONREPEAT_POST`
104
-
*`BUTTONREPEAT_FIRST` indicates it is the first call, usually a manual button press
-`BUTTONREPEAT_POST` is called after the loop is finished
107
+
- descr: the entity description object of the button
108
+
- datadict: the dictionary with all the known entity values
109
109
110
110
In its current form, the function should return a dictionary containing following items:
111
-
*`action`: the modbus type of write to be executed: currently only MODBUS_WRITE_MULTI is suppored, but the other writes can be easily added later.
112
-
*`register` (optional): if not specified, the register address for the autorepeat button will be used
113
-
*`data`: a list of tuples `[ (entity_key, value,), ....]` that represents the payload of a write_multiple command that starts at the modbus register addres. Instead of the entity_key_name, a register type can also be specified like `REGISTER_U16`. The payload should not contain the button's entity itself, just the data that needs to be added in the write_multiple scenario. In the future, the `data` structure may be modified to allow other types of writes.
111
+
-`action`: the modbus type of write to be executed: currently only MODBUS_WRITE_MULTI is suppored, but the other writes can be easily added later.
112
+
-`register` (optional): if not specified, the register address for the autorepeat button will be used
113
+
-`data`: a list of tuples `[ (entity_key, value,), ....]` that represents the payload of a write_multiple command that starts at the modbus register addres. Instead of the entity_key_name, a register type can also be specified like `REGISTER_U16`. The payload should not contain the button's entity itself, just the data that needs to be added in the write_multiple scenario. In the future, the `data` structure may be modified to allow other types of writes.
114
114
115
115
The system will automatically convert the data to the modbus low level format, and compute the length of the write_multiple payload to be written to modbus.
0 commit comments