Skip to content

Instantly share code, notes, and snippets.

@skylord123
Created January 20, 2020 22:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skylord123/627a12c1668420c4579de7eea1f70ff7 to your computer and use it in GitHub Desktop.
Save skylord123/627a12c1668420c4579de7eea1f70ff7 to your computer and use it in GitHub Desktop.
Hue remote disabling input_boolean in Home Assistant from Node-RED
[{"id":"f984031f.c223d","type":"hue-switch","z":"ff717302.0c688","name":"Living room switch","bridge":"d2b1d65b.cbe438","sensorid":"6","x":290,"y":3680,"wires":[["229b2298.8b45fe","65985f7.4e331a"]]},{"id":"65985f7.4e331a","type":"switch","z":"ff717302.0c688","name":"Off button","property":"payload.name","propertyType":"msg","rules":[{"t":"eq","v":"Off","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":500,"y":3720,"wires":[["ffb041d6.1476d"]]},{"id":"229b2298.8b45fe","type":"switch","z":"ff717302.0c688","name":"On button","property":"payload.name","propertyType":"msg","rules":[{"t":"eq","v":"On","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":500,"y":3660,"wires":[["fe8a3935.8a63d8"]]},{"id":"fe8a3935.8a63d8","type":"switch","z":"ff717302.0c688","name":"action","property":"payload.action","propertyType":"msg","rules":[{"t":"eq","v":"holded","vt":"str"},{"t":"eq","v":"short released","vt":"str"},{"t":"eq","v":"long released","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":650,"y":3660,"wires":[[],[],["a189aba3.b3ff08"]]},{"id":"ffb041d6.1476d","type":"switch","z":"ff717302.0c688","name":"action","property":"payload.action","propertyType":"msg","rules":[{"t":"eq","v":"holded","vt":"str"},{"t":"eq","v":"short released","vt":"str"},{"t":"eq","v":"long released","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":650,"y":3720,"wires":[[],[],["ea45fb86.5ae598"]]},{"id":"a189aba3.b3ff08","type":"api-call-service","z":"ff717302.0c688","name":"","server":"233a9c63.e2baf4","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.auto_living_room_light","data":"","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":860,"y":3660,"wires":[[]]},{"id":"ea45fb86.5ae598","type":"api-call-service","z":"ff717302.0c688","name":"","server":"233a9c63.e2baf4","version":"1","debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.auto_living_room_light","data":"","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":860,"y":3720,"wires":[[]]},{"id":"4ed87bcd.1bd4c4","type":"comment","z":"ff717302.0c688","name":"Living Room Hue Remote","info":"","x":430,"y":3600,"wires":[]},{"id":"d2b1d65b.cbe438","type":"hue-bridge","z":"","name":"Philips hue","bridge":"192.168.1.142","key":"-P3euEiGIF6D4pb6TD1WE2ECJzrkR7RNpyUn5Pic","interval":"1000"},{"id":"233a9c63.e2baf4","type":"server","z":"","name":"Home Assistant","legacy":false,"hassio":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true}]
@skylord123
Copy link
Author

skylord123 commented Jan 20, 2020

This is a snippet from my own Node-RED setup.

Node-RED flow

In my living room I have the Hue remote setup to control the lights. I also have a DIY motion sensor that triggers the lights via Home Assistant. Inside Home Assistant I have a input_boolean that I use to turn on/off the automatic living room lights. I ended up making it so if you hold the off button on the remote it will disable this input_boolean and it will also turn it back on if you hold the on button. This way people can disable automatic lights for a room without needing access to HA.

@navarro152
Copy link

Thanks for sharing. I am new in NodeRed and I have been struggle so much to use the hue dimmers.... that way I am, and thanks to your code and importing it, I could see how I needed to use the switch node.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment