i will try looking into a node that can monitor the state of the shelly.
As for the inject node i dont quite understand how to apply that to my current flow. can you perhaps share a exemple flow on how this works and improves my current flow?
here is the sourse code of my flow:
[{"id":"124727204afb0b5d","type":"tab","label":"Controlador Luz Aquario","disabled":false,"info":"","env":[]},{"id":"77b757fb572708f0","type":"api-call-service","z":"124727204afb0b5d","name":"TURN LIGHT ON","server":"a8cd1e6a.e1868","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_on","areaId":["sala_de_estar"],"deviceId":["d44f4bd4ed933c4ce0c4893b2444ebc4"],"entityId":["light.shellyrgbw2_ddccd8","light.shellyrgbw2_ddccd8_channel_2","light.shellyrgbw2_ddccd8_channel_3","light.shellyrgbw2_ddccd8_channel_4"],"data":"{\"brightness_pct\": payload.brightness_pct}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":750,"y":500,"wires":[[]]},{"id":"f3e60013167e0860","type":"light-transition","z":"124727204afb0b5d","name":"0-50% (15 min)","startRGB":"#ff0000","transitionRGB":"#ffc864","endRGB":"#ffffff","startMired":"","endMired":"","transitionTime":"15","transitionTimeUnits":"Minute","steps":"50","startBright":"0","endBright":"50","brightnessType":"Percent","transitionType":"Linear","colorTransitionType":"None","x":540,"y":560,"wires":[["77b757fb572708f0"],["85f033bac2bf8c92"]]},{"id":"85f033bac2bf8c92","type":"delay","z":"124727204afb0b5d","name":"","pauseType":"delay","timeout":"60","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":730,"y":620,"wires":[["39bec14f69597066"]]},{"id":"39bec14f69597066","type":"light-transition","z":"124727204afb0b5d","name":"50-100% (15 min)","startRGB":"#ff0000","transitionRGB":"#ffc864","endRGB":"#ffffff","startMired":"","endMired":"","transitionTime":"15","transitionTimeUnits":"Minute","steps":"50","startBright":"50","endBright":"100","brightnessType":"Percent","transitionType":"Linear","colorTransitionType":"None","x":530,"y":740,"wires":[["c6e8681add3e3bf0"],["caf2ee7c415a1862"]]},{"id":"c6e8681add3e3bf0","type":"api-call-service","z":"124727204afb0b5d","name":"TURN LIGHT ON","server":"a8cd1e6a.e1868","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_on","areaId":["sala_de_estar"],"deviceId":["d44f4bd4ed933c4ce0c4893b2444ebc4"],"entityId":["light.shellyrgbw2_ddccd8_channel_4","light.shellyrgbw2_ddccd8","light.shellyrgbw2_ddccd8_channel_2","light.shellyrgbw2_ddccd8_channel_3"],"data":"{\"brightness_pct\": payload.brightness_pct}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":750,"y":700,"wires":[[]]},{"id":"caf2ee7c415a1862","type":"delay","z":"124727204afb0b5d","name":"","pauseType":"delay","timeout":"6","timeoutUnits":"hours","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":720,"y":780,"wires":[["98ee8f6fc0bca944"]]},{"id":"98ee8f6fc0bca944","type":"light-transition","z":"124727204afb0b5d","name":"100-50% (15 min)","startRGB":"#ff0000","transitionRGB":"#ffc864","endRGB":"#ffffff","startMired":"","endMired":"","transitionTime":"15","transitionTimeUnits":"Minute","steps":"50","startBright":"100","endBright":"50","brightnessType":"Percent","transitionType":"Linear","colorTransitionType":"None","x":530,"y":920,"wires":[["3ddec053db9ce7e9"],["2cf0a78f18000d5c"]]},{"id":"2cf0a78f18000d5c","type":"delay","z":"124727204afb0b5d","name":"","pauseType":"delay","timeout":"60","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":730,"y":960,"wires":[["c23674832bc085b0"]]},{"id":"c23674832bc085b0","type":"light-transition","z":"124727204afb0b5d","name":"50-100% (15 min)","startRGB":"#ff0000","transitionRGB":"#ffc864","endRGB":"#ffffff","startMired":"","endMired":"","transitionTime":"15","transitionTimeUnits":"Minute","steps":"50","startBright":"50","endBright":"1","brightnessType":"Percent","transitionType":"Linear","colorTransitionType":"None","x":530,"y":1100,"wires":[["a596f0b1e895acce"],["53606ca86d7e92b2"]]},{"id":"695501d27c546090","type":"api-call-service","z":"124727204afb0b5d","name":"TURN LIGHT OFF","server":"a8cd1e6a.e1868","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_off","areaId":["sala_de_estar"],"deviceId":["d44f4bd4ed933c4ce0c4893b2444ebc4"],"entityId":["light.shellyrgbw2_ddccd8_channel_4","light.shellyrgbw2_ddccd8","light.shellyrgbw2_ddccd8_channel_2","light.shellyrgbw2_ddccd8_channel_3"],"data":"{\"brightness_pct\": payload.brightness_pct}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":950,"y":1140,"wires":[[]]},{"id":"3ddec053db9ce7e9","type":"api-call-service","z":"124727204afb0b5d","name":"TURN LIGHT ON","server":"a8cd1e6a.e1868","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_on","areaId":["sala_de_estar"],"deviceId":["d44f4bd4ed933c4ce0c4893b2444ebc4"],"entityId":["light.shellyrgbw2_ddccd8_channel_4","light.shellyrgbw2_ddccd8","light.shellyrgbw2_ddccd8_channel_2","light.shellyrgbw2_ddccd8_channel_3"],"data":"{\"brightness_pct\": payload.brightness_pct}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":750,"y":880,"wires":[[]]},{"id":"a596f0b1e895acce","type":"api-call-service","z":"124727204afb0b5d","name":"TURN LIGHT ON","server":"a8cd1e6a.e1868","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_on","areaId":["sala_de_estar"],"deviceId":["d44f4bd4ed933c4ce0c4893b2444ebc4"],"entityId":["light.shellyrgbw2_ddccd8_channel_4","light.shellyrgbw2_ddccd8","light.shellyrgbw2_ddccd8_channel_2","light.shellyrgbw2_ddccd8_channel_3"],"data":"{\"brightness_pct\": payload.brightness_pct}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":750,"y":1060,"wires":[[]]},{"id":"53606ca86d7e92b2","type":"change","z":"124727204afb0b5d","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":740,"y":1140,"wires":[["695501d27c546090"]]},{"id":"4931af9f235add0d","type":"schedex","z":"124727204afb0b5d","name":"","passthroughunhandled":false,"suspended":false,"lat":"","lon":"","ontime":"12:58","ontopic":"","onpayload":"on","onoffset":"0","onrandomoffset":0,"offtime":"22:00","offtopic":"","offpayload":"off","offoffset":0,"offrandomoffset":0,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"sun":true,"x":310,"y":440,"wires":[["f3e60013167e0860"]]},{"id":"3b3f8f72334a4418","type":"inject","z":"124727204afb0b5d","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":"3600","topic":"","payload":"on","payloadType":"str","x":170,"y":340,"wires":[["4931af9f235add0d"]]},{"id":"2ef3485144ce69a4","type":"inject","z":"124727204afb0b5d","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"off","payloadType":"str","x":170,"y":520,"wires":[["4931af9f235add0d"]]},{"id":"a8cd1e6a.e1868","type":"server","name":"Home Assistant","addon":true}]