Skip to content

Commit b23e8de

Browse files
authored
Update developer_guide.md - still struggling with formatting
1 parent 2fb08f7 commit b23e8de

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

docs/developer_guide.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -100,17 +100,17 @@ A button can have the attribute autorepeat, an attribute that specifies the enti
100100
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.
101101
The meaning of the parameters of a button autorepeat value_function is:
102102

103-
* initval: either `BUTTONREPEAT_FIRST`, `BUTTONREPEAT_LOOP`, `BUTTONREPEAT_POST`
104-
* `BUTTONREPEAT_FIRST` indicates it is the first call, usually a manual button press
105-
* `BUTTONREPEAT_LOOP` indicates subsequent autorepeated calls
106-
* `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
103+
- initval: either `BUTTONREPEAT_FIRST`, `BUTTONREPEAT_LOOP`, `BUTTONREPEAT_POST`
104+
- `BUTTONREPEAT_FIRST` indicates it is the first call, usually a manual button press
105+
- `BUTTONREPEAT_LOOP` indicates subsequent autorepeated calls
106+
- `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
109109

110110
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.
114114

115115
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.
116116

0 commit comments

Comments
 (0)