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: config/README.md
+11-4Lines changed: 11 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,9 +20,9 @@ Each `rule` object may contain following nodes:
20
20
-`valueMapsToMqtt` - mapping rules, when it's necessary to convert a value received from `devices/action` before publish to MQTT
21
21
22
22
#### rule.alexa
23
-
This node may contain following nodes:
24
-
-`alisa.instance` - is an Alisa controller instance under `state` node.
25
-
-`alisa.subvalue` - when reporting state to Alisa, the `state` should be a complex node, rather than a simple value. It defines a subnode name under `state` for providing state. For example for `devices.capabilities.color_setting` with `color_model`=`hsv`, the expected report value must be like that:
23
+
This node may contain following subnodes:
24
+
-`alisa.instance` - is an `instance` under `state` node in communication with Alisa.
25
+
-`alisa.subvalue` - when reporting state to Alisa, the `value` should be a complex node, rather than a simple value. It defines a subnode name under `state.value` for providing state. For example for `devices.capabilities.color_setting` with `color_model`=`hsv`, the expected report value must be like that:
26
26
27
27
```json
28
28
...
@@ -74,7 +74,7 @@ to achieve that, it's necessary to define 3 rules, one per subvalue:
74
74
```
75
75
76
76
#### rule.mqtt
77
-
This node may contain following nodes:
77
+
This node may contain following subnodes:
78
78
-`mqtt.state` - topic name with values received from Home Automation System. Used as a value-source for `devices/query` responses.
79
79
-`mqtt.commands` - topic name for commands to be sent to Home Automation System. Used as target-topic for `devices/action` commands received from Alexa.
80
80
@@ -192,6 +192,13 @@ in this case, one can use <code>h</code>, <code>s</code>, and <code>v</code> as
192
192
193
193
When rule contains multiple mappings, they are attempted to be applied in order from first to last. If some mapping can't be applied (for example `value` mapping doesn't match `from` field), then this mapping is skipped, and verified next one. Iteration stopped after first successful conversion.
194
194
195
+
Though most of mapping types (except `linearRange`) are having output definitions as strings, when sent to Alisa as a query-response, they get casted to appropriate type automatically. For example:
0 commit comments