Agree…with maxym
Here another example of Node-Red encouragement
[{"id":"740c0f3d.77954","type":"bigtimer","z":"cfb20f1a.f7461","outtopic":"","outpayload1":"turn_on","outpayload2":"turn_off","name":"Every day from Sunset until Sunrise","comment":"","lat":"51.831092","lon":"4.335460","starttime":"5004","endtime":"5003","starttime2":0,"endtime2":0,"startoff":"1","endoff":"-1","startoff2":0,"endoff2":0,"offs":0,"outtext1":"on","outtext2":"off","timeout":1440,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"day7":"","month7":"","day8":"","month8":"","day9":"","month9":"","day10":"","month10":"","day11":"","month11":"","day12":"","month12":"","d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"randon1":false,"randoff1":false,"randon2":false,"randoff2":false,"repeat":false,"atstart":false,"odd":false,"even":false,"x":200,"y":160,"wires":[["506eed03.24cff4"],[],[]]},{"id":"b6ec534a.f94bc","type":"api-call-service","z":"cfb20f1a.f7461","name":"Light.outside front","server":"37d68302.2aabcc","version":1,"debugenabled":false,"service_domain":"light","service":"","entityId":"light.outside_front","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":730,"y":160,"wires":[[]]},{"id":"506eed03.24cff4","type":"function","z":"cfb20f1a.f7461","name":"light.outside_front","func":"if ( msg.payload.includes( \"turn_on\"))\n{\n msg.payload = {\n domain: \"light\",\n service: \"turn_on\",\n data: {\n entity_id: \"light.outside_front\",\n \"brightness_pct\": 75\n }\n };\n}\nelse\n{\n msg.payload = {\n domain: \"light\",\n service: \"turn_off\",\n data: {\n entity_id: \"light.outside_front\"\n }\n };\n}\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":510,"y":160,"wires":[["b6ec534a.f94bc"]]},{"id":"37d68302.2aabcc","type":"server","name":"Home Assistant"}]