node-red-contrib-esphome 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +22 -0
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -43,7 +43,29 @@ $ npm i node-red-contrib-esphome
43
43
 
44
44
  ## Inputs
45
45
 
46
+ Inputs are sent to the node as JSON payloads. The list below provides a list of keys and values (and their expected value type) that may be sent to the "esphome out" nodes. It is helpful to watch the "esphome in" messages to learn which type and range of commands are expected by your device.
47
+
48
+ Some example message payloads are:
49
+
50
+ ```js
51
+ // to set a light on:
52
+ msg.payload = {'state': true}
53
+
54
+ // set a door lock to unlock:
55
+ msg.payload = {'command':0}
56
+
57
+ // to toggle a light to 42% brightness:
58
+ msg.payload = {'brightness': 42}
59
+
60
+ // to press a button:
61
+ msg.payload = true
62
+ ```
63
+
64
+
46
65
  #### Button
66
+
67
+ Button inputs may be triggered with any payload in the input message. Simply send a timestamp, `true`, or other payload to the button node. Button type nodes provide no messages into Node-RED.
68
+
47
69
  #### Climate
48
70
  - `mode` - optional. 0 - OFF, 1 - AUTO, 2 - COOL, 3 - HEAT, 4 - FAN_ONLY, 5 - DRY. See `supportedModesList` attr in config
49
71
  - `targetTemperature`- optional. float
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-esphome",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "Node-RED nodes to ESPhome devices",
5
5
  "homepage": "https://github.com/twocolors/node-red-contrib-esphome",
6
6
  "license": "MIT",
@@ -29,7 +29,7 @@
29
29
  }
30
30
  },
31
31
  "dependencies": {
32
- "@2colors/esphome-native-api": "^1.2.6"
32
+ "@2colors/esphome-native-api": "1.2.8"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/node": "^20.1.0",