Created
December 27, 2019 20:04
-
-
Save vigonotion/2e0a7e3537bf150f99681b5b4f2f3339 to your computer and use it in GitHub Desktop.
Save and restore light states using Home Assistant (Node-RED automation)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": "1a171a83.11dfdd", | |
"type": "api-call-service", | |
"z": "25e52f9c.ae111", | |
"name": "save state", | |
"server": "e02cc9b7.16ead8", | |
"version": 1, | |
"debugenabled": false, | |
"service_domain": "scene", | |
"service": "create", | |
"entityId": "", | |
"data": "{\"scene_id\":\"snapshot_livingroom\",\"snapshot_entities\":[\"light.ceiling\",\"light.ambient_right\",\"light.ambient_left\",\"light.led_strip\",\"media_player.radio\"]}", | |
"dataType": "json", | |
"mergecontext": "", | |
"output_location": "", | |
"output_location_type": "none", | |
"mustacheAltTags": false, | |
"x": 440, | |
"y": 280, | |
"wires": [ | |
[] | |
] | |
}, | |
{ | |
"id": "252d2fe9.eb594", | |
"type": "api-call-service", | |
"z": "25e52f9c.ae111", | |
"name": "restore state", | |
"server": "e02cc9b7.16ead8", | |
"version": 1, | |
"debugenabled": false, | |
"service_domain": "scene", | |
"service": "turn_on", | |
"entityId": "scene.snapshot_livingroom", | |
"data": "", | |
"dataType": "json", | |
"mergecontext": "", | |
"output_location": "", | |
"output_location_type": "none", | |
"mustacheAltTags": false, | |
"x": 450, | |
"y": 240, | |
"wires": [ | |
[] | |
] | |
}, | |
{ | |
"id": "d49e8f29.e1b6c", | |
"type": "server-state-changed", | |
"z": "25e52f9c.ae111", | |
"name": "", | |
"server": "e02cc9b7.16ead8", | |
"version": 1, | |
"entityidfilter": "binary_sensor.rocker_left", | |
"entityidfiltertype": "exact", | |
"outputinitially": false, | |
"state_type": "str", | |
"haltifstate": "on", | |
"halt_if_type": "str", | |
"halt_if_compare": "is", | |
"outputs": 2, | |
"output_only_on_state_change": true, | |
"x": 180, | |
"y": 240, | |
"wires": [ | |
[ | |
"252d2fe9.eb594" | |
], | |
[] | |
] | |
}, | |
{ | |
"id": "b1954096.895178", | |
"type": "server-state-changed", | |
"z": "25e52f9c.ae111", | |
"name": "", | |
"server": "e02cc9b7.16ead8", | |
"version": 1, | |
"entityidfilter": "binary_sensor.rocker_right", | |
"entityidfiltertype": "exact", | |
"outputinitially": false, | |
"state_type": "str", | |
"haltifstate": "on", | |
"halt_if_type": "str", | |
"halt_if_compare": "is", | |
"outputs": 2, | |
"output_only_on_state_change": true, | |
"x": 180, | |
"y": 280, | |
"wires": [ | |
[ | |
"1a171a83.11dfdd" | |
], | |
[] | |
] | |
}, | |
{ | |
"id": "e02cc9b7.16ead8", | |
"type": "server", | |
"z": "", | |
"name": "Home Assistant", | |
"legacy": false, | |
"hassio": true, | |
"rejectUnauthorizedCerts": true, | |
"ha_boolean": "y|yes|true|on|home|open", | |
"connectionDelay": true | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment