I use node red, but what is the definition of āeasierā ?
It looks simple; just connecting building blocks, but some blocks use java ā¦
[{"id":"480e4fbb.d7002","type":"tab","label":"Motion","disabled":false,"info":""},{"id":"657089a.ec2ba78","type":"function","z":"480e4fbb.d7002","name":"Turn on 1%","func":"msg.payload = {\n domain: \"light\",\n service: \"turn_on\",\n data: {\n entity_id: \"light.light_hallway_upstairs\",\n \"brightness_pct\": 1\n }\n};\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":670,"y":140,"wires":[["d67976c3.140b78","4e9c980c.3cdee8"]]},{"id":"4e9c980c.3cdee8","type":"api-call-service","z":"480e4fbb.d7002","name":"payload entity","server":"37d68302.2aabcc","version":5,"debugenabled":false,"domain":"homeassistant","service":"","areaId":[],"deviceId":[],"entityId":[],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1160,"y":580,"wires":[["c380196.54abde8"]]},{"id":"fe199ecf.000f4","type":"function","z":"480e4fbb.d7002","name":"Turn off","func":"msg.payload = {\n domain: \"light\",\n service: \"turn_off\",\n data: {\n entity_id: msg.data.entity_id,\n }\n};\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1160,"y":360,"wires":[["4e9c980c.3cdee8"]]},{"id":"d67976c3.140b78","type":"function","z":"480e4fbb.d7002","name":"Reset 3m Delay","func":"msg.delay = 180000;\nreturn [msg];","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":900,"y":120,"wires":[["ddef815f2eac0f31","90d337bb4f3ae369"]]},{"id":"20b47ca3.89f634","type":"server-state-changed","z":"480e4fbb.d7002","name":"","server":"37d68302.2aabcc","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"light.light_hallway_upstairs","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,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":160,"y":80,"wires":[["d67976c3.140b78","b4fefb11.a9ff78"],["875f4aaf.ff7cf8"]]},{"id":"64a7da4a.74b264","type":"function","z":"480e4fbb.d7002","name":"Turn on 100%","func":"msg.payload = {\n domain: \"light\",\n service: \"turn_on\",\n data: {\n entity_id: \"light.light_hallway_upstairs\",\n \"brightness_pct\": 100\n }\n};\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":680,"y":180,"wires":[["d67976c3.140b78","4e9c980c.3cdee8"]]},{"id":"9bb684bd.eda288","type":"function","z":"480e4fbb.d7002","name":"Turn on 15%","func":"msg.payload = {\n domain: \"light\",\n service: \"turn_on\",\n data: {\n entity_id: \"light.light_hallway_downstairs\",\n \"brightness_pct\": 15\n }\n};\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":670,"y":660,"wires":[["5ab4df3.29eaa2","4e9c980c.3cdee8"]]},{"id":"5ab4df3.29eaa2","type":"function","z":"480e4fbb.d7002","name":"Reset 3m Delay","func":"msg.delay = 180000;\nreturn [msg];","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":900,"y":640,"wires":[["b686e240db36962c"]]},{"id":"7026ec5c.25afe4","type":"time-range-switch","z":"480e4fbb.d7002","name":"","lat":"51.83125","lon":"4.33552","startTime":"sunset","endTime":"sunriseEnd","startOffset":"","endOffset":0,"x":440,"y":700,"wires":[["9bb684bd.eda288"],["94e27b0a64833bf7"]]},{"id":"a3fbdd0d.41e8e","type":"server-state-changed","z":"480e4fbb.d7002","name":"","server":"37d68302.2aabcc","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"light.light_hallway_downstairs","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,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":170,"y":600,"wires":[["5ab4df3.29eaa2","b4fefb11.a9ff78"],["6dbb846c.9e82cc"]]},{"id":"b4fefb11.a9ff78","type":"switch","z":"480e4fbb.d7002","name":"Get brightness","property":"data.new_state.attributes.brightness","propertyType":"msg","rules":[{"t":"gt","v":"25","vt":"num"}],"checkall":"true","repair":true,"outputs":1,"x":1040,"y":300,"wires":[["b1c34edd.9809d"]]},{"id":"b1c34edd.9809d","type":"function","z":"480e4fbb.d7002","name":"Set brightness level","func":"msg.payload = {\n domain: \"light\",\n service: \"turn_on\",\n data: {\n entity_id: msg.data.entity_id,\n \"brightness\":msg.data.new_state.attributes.brightness\n }\n};\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1230,"y":300,"wires":[["4e9c980c.3cdee8"]]},{"id":"875f4aaf.ff7cf8","type":"function","z":"480e4fbb.d7002","name":"Cancel","func":"msg.payload = \"stop\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":660,"y":60,"wires":[["ddef815f2eac0f31"]]},{"id":"6dbb846c.9e82cc","type":"function","z":"480e4fbb.d7002","name":"Cancel","func":"msg.payload = \"stop\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":660,"y":580,"wires":[["b686e240db36962c"]]},{"id":"c380196.54abde8","type":"debug","z":"480e4fbb.d7002","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1310,"y":580,"wires":[]},{"id":"58064783.3d6cd8","type":"server-state-changed","z":"480e4fbb.d7002","name":"PIR Hallw.Upstrs","server":"37d68302.2aabcc","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.motion_hallway_upstairs_occupancy","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":100,"y":220,"wires":[[],[]]},{"id":"d1374b7.1eda3b8","type":"server-state-changed","z":"480e4fbb.d7002","name":"PIR Mst Bedroom","server":"37d68302.2aabcc","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.motion_master_bedroom_occupancy","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":100,"y":160,"wires":[["daff13bb.15281"],[]]},{"id":"cc5ee022.06a45","type":"api-current-state","z":"480e4fbb.d7002","name":"Already On?","server":"37d68302.2aabcc","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.light_hallway_downstairs","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":290,"y":640,"wires":[["5ab4df3.29eaa2"],["7026ec5c.25afe4"]]},{"id":"daff13bb.15281","type":"api-current-state","z":"480e4fbb.d7002","name":"Already On?","server":"37d68302.2aabcc","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.light_hallway_upstairs","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":290,"y":120,"wires":[["d67976c3.140b78"],["d138811.3e1c58"]]},{"id":"94e27b0a64833bf7","type":"function","z":"480e4fbb.d7002","name":"Turn on 100%","func":"msg.payload = {\n domain: \"light\",\n service: \"turn_on\",\n data: {\n entity_id: \"light.light_hallway_downstairs\",\n \"brightness_pct\": 100\n }\n};\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":680,"y":700,"wires":[["4e9c980c.3cdee8","5ab4df3.29eaa2"]]},{"id":"2c9256b691bfbd68","type":"api-current-state","z":"480e4fbb.d7002","name":"Already On?","server":"37d68302.2aabcc","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.bathroom_shower_light","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":290,"y":860,"wires":[["c11b2c44abfbda34"],["e7f26db07129dd40"]]},{"id":"134ff7500a1c6357","type":"function","z":"480e4fbb.d7002","name":"Switch On Daytime","func":"msg.payload = {\n domain: \"switch\",\n service: \"turn_on\",\n data: {\n entity_id: \"switch.bathroom_shower_light\"\n }\n};\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":690,"y":900,"wires":[["c11b2c44abfbda34","4e9c980c.3cdee8"]]},{"id":"bf4af0d6af5e98cf","type":"server-state-changed","z":"480e4fbb.d7002","name":"","server":"37d68302.2aabcc","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"switch.bathroom_shower_light","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,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":170,"y":820,"wires":[["c11b2c44abfbda34"],["ce512a0168fba370"]]},{"id":"ce512a0168fba370","type":"function","z":"480e4fbb.d7002","name":"Cancel","func":"msg.payload = \"stop\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":660,"y":800,"wires":[["58a3bbe4d5dcce3b"]]},{"id":"c11b2c44abfbda34","type":"function","z":"480e4fbb.d7002","name":"Reset 15m Delay","func":"msg.delay = 1500000;\nreturn [msg];","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":910,"y":840,"wires":[["58a3bbe4d5dcce3b"]]},{"id":"ddb053fdf17b2e0a","type":"function","z":"480e4fbb.d7002","name":"Turn off","func":"msg.payload = {\n domain: \"switch\",\n service: \"turn_off\",\n data: {\n entity_id: \"switch.bathroom_shower_light\"\n }\n};\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1180,"y":660,"wires":[["4e9c980c.3cdee8"]]},{"id":"58a3bbe4d5dcce3b","type":"stoptimer","z":"480e4fbb.d7002","duration":"15","units":"Minute","payloadtype":"num","payloadval":"0","name":"","x":900,"y":780,"wires":[["ddb053fdf17b2e0a"],[]]},{"id":"b686e240db36962c","type":"stoptimer","z":"480e4fbb.d7002","duration":"3","units":"Minute","payloadtype":"num","payloadval":"0","name":"","x":900,"y":580,"wires":[["fe199ecf.000f4"],[]]},{"id":"ddef815f2eac0f31","type":"stoptimer","z":"480e4fbb.d7002","duration":"3","units":"Minute","payloadtype":"num","payloadval":"0","name":"","x":900,"y":60,"wires":[["fe199ecf.000f4"],[]]},{"id":"e7f26db07129dd40","type":"time-range-switch","z":"480e4fbb.d7002","name":"","lat":"51.83125","lon":"4.33552","startTime":"22:00","endTime":"7:00","startOffset":"0","endOffset":"0","x":410,"y":920,"wires":[["f460b58c9d8decf4"],["134ff7500a1c6357"]]},{"id":"10ae7b3029837675","type":"link in","z":"480e4fbb.d7002","name":"Motion Office","links":["5e68004f5a41255a"],"x":165,"y":400,"wires":[["64c34644.a21288","284b1dfb5747d26b"]]},{"id":"940d3e9a31e7dffc","type":"link in","z":"480e4fbb.d7002","name":"Motion Hallway Downstairs","links":["247ff713ae34324e"],"x":165,"y":640,"wires":[["cc5ee022.06a45"]]},{"id":"c3123b22a9e8b99b","type":"link in","z":"480e4fbb.d7002","name":"Motion/Door Toilet Upstairs","links":["ea96cdb2de7642d8"],"x":165,"y":860,"wires":[["2c9256b691bfbd68"]]},{"id":"64c34644.a21288","type":"api-current-state","z":"480e4fbb.d7002","name":"Already On?","server":"37d68302.2aabcc","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.lights_office","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":290,"y":400,"wires":[[],["edc7966c.447588"]]},{"id":"edc7966c.447588","type":"function","z":"480e4fbb.d7002","name":"Turn on 100%","func":"msg.payload = {\n domain: \"light\",\n service: \"turn_on\",\n data: {\n entity_id: \"light.lights_office\",\n \"brightness_pct\": 100\n }\n};\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":680,"y":400,"wires":[["4e9c980c.3cdee8"]]},{"id":"5e7a9f12d6c7d909","type":"comment","z":"480e4fbb.d7002","name":"Light Office","info":"","x":90,"y":320,"wires":[]},{"id":"284b1dfb5747d26b","type":"api-call-service","z":"480e4fbb.d7002","name":"OfficeMotion","server":"37d68302.2aabcc","version":5,"debugenabled":false,"domain":"input_boolean","service":"turn_on","areaId":[],"deviceId":[],"entityId":["input_boolean.officemotion"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":130,"y":360,"wires":[["67fa80b7c2a5e655"]]},{"id":"079cee6cb70e5d4f","type":"api-call-service","z":"480e4fbb.d7002","name":"OfficeNoMotion","server":"37d68302.2aabcc","version":5,"debugenabled":false,"domain":"input_boolean","service":"turn_off","areaId":[],"deviceId":[],"entityId":["input_boolean.officemotion"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":700,"y":360,"wires":[[]]},{"id":"67fa80b7c2a5e655","type":"function","z":"480e4fbb.d7002","name":"Reset 120s Delay","func":"msg.delay =120000;\nreturn [msg];","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":310,"y":360,"wires":[["e1f2af4ae546190b"]]},{"id":"e1f2af4ae546190b","type":"stoptimer","z":"480e4fbb.d7002","duration":"120","units":"Second","payloadtype":"num","payloadval":"0","name":"","x":510,"y":360,"wires":[["079cee6cb70e5d4f"],[]]},{"id":"f460b58c9d8decf4","type":"function","z":"480e4fbb.d7002","name":"Switch On NightTime","func":"msg.payload = {\n domain: \"switch\",\n service: \"turn_on\",\n data: {\n entity_id: \"switch.bathroom_secondary_light\"\n }\n};\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":700,"y":940,"wires":[[]]},{"id":"d138811.3e1c58","type":"time-range-switch","z":"480e4fbb.d7002","name":"","lat":"51.83125","lon":"4.33552","startTime":"19:30","endTime":"sunriseEnd","startOffset":"0","endOffset":"1","x":430,"y":180,"wires":[["657089a.ec2ba78"],["64a7da4a.74b264"]]},{"id":"cf18ed8d0f6650d7","type":"link in","z":"480e4fbb.d7002","name":"Motion Hallway Upstairs","links":["2511e9a4a4f60833"],"x":165,"y":120,"wires":[["daff13bb.15281"]]},{"id":"ce613e68006fe462","type":"comment","z":"480e4fbb.d7002","name":"Light Hallway Upstairs","info":"","x":120,"y":40,"wires":[]},{"id":"eb2f558ba160e703","type":"comment","z":"480e4fbb.d7002","name":"Light Hallway Downstairs","info":"","x":130,"y":560,"wires":[]},{"id":"f50782160983d9d5","type":"comment","z":"480e4fbb.d7002","name":"Light Bathroom Upstairs","info":"","x":100,"y":780,"wires":[]},{"id":"90d337bb4f3ae369","type":"debug","z":"480e4fbb.d7002","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1130,"y":120,"wires":[]},{"id":"37d68302.2aabcc","type":"server","name":"Home Assistant","version":4,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m"}]
(this is the automation for 4 lights)