node-red-contrib-ha-state
v1.3.0
Published
observable things in node red
Downloads
54
Maintainers
Readme
node-red-contrib-ha-state
observable things in node red
Install
via the manage palette menu
or manually:
cd <NODE_RED_PATH>
npm install node-red-contrib-ha-state
Functionality
- Create a type of a device with a Thing Type Node, which has 2 settings:
- attributes: constants that are specific to a thing
- states: properties that can change over time
- Store a device state in a Thing node
- Fire an event when the value of a state changes using an Event node
- Compare the values with custom rules in a Gate node
- Output the value to another flow with a Value node
- Change a state via an Action node
e.g. if you have smart thermostats:
- create the Thermostat Thing type:
- add attribute id
- add temperature, target and battery as states
- create a living room Thing of type Thermostat (this represents the actual device)
- set the id for the device
- manipulate the living room thermostat via the action node, and listen to changes via the event node
Note: a Thing is just a virtual representation of the device, any connection to a real device must be done seperately