Hi,
i’m currently using node-red-contrib-sunevents node to update input_text helper in HA.
When this input_text helper changes to right value, like goldenHour, I enable some input_boolean helper (usually after some delay)
[{"id":"7b7effe6.51ebc","type":"server-state-changed","z":"5437f3d.da9f40c","g":"8a2a16f979aa4c82","name":"","server":"dcf02f05.b9371","version":4,"entityidfilter":"input_text.input_sun_events","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":"0","forType":"num","forUnits":"minutes","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":1090,"y":1780,"wires":[["d2affabd.d48688"]]},{"id":"d2affabd.d48688","type":"switch","z":"5437f3d.da9f40c","g":"8a2a16f979aa4c82","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"sunriseEnd","vt":"str"},{"t":"eq","v":"goldenHour","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":1360,"y":1780,"wires":[["6fe0f1df.ea7c2"],["4d509174.efaea"]]},{"id":"6fe0f1df.ea7c2","type":"delay","z":"5437f3d.da9f40c","g":"8a2a16f979aa4c82","name":"","pauseType":"delay","timeout":"20","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":1520,"y":1760,"wires":[["c902c3ac.4fd8b"]]},{"id":"4d509174.efaea","type":"delay","z":"5437f3d.da9f40c","g":"8a2a16f979aa4c82","name":"","pauseType":"delay","timeout":"20","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":1520,"y":1820,"wires":[["819df15e.098f"]]},{"id":"c902c3ac.4fd8b","type":"api-call-service","z":"5437f3d.da9f40c","g":"8a2a16f979aa4c82","name":"","server":"dcf02f05.b9371","version":5,"debugenabled":false,"domain":"input_boolean","service":"turn_off","areaId":[],"deviceId":[],"entityId":["input_boolean.light_state_kuchyne_strip_virtual"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1730,"y":1760,"wires":[[]]},{"id":"819df15e.098f","type":"api-call-service","z":"5437f3d.da9f40c","g":"8a2a16f979aa4c82","name":"","server":"dcf02f05.b9371","version":5,"debugenabled":false,"domain":"input_boolean","service":"turn_on","areaId":[],"deviceId":[],"entityId":["input_boolean.light_state_kuchyne_strip_virtual"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1730,"y":1820,"wires":[[]]},{"id":"dcf02f05.b9371","type":"server","name":"my_homeassistant","version":5,"addon":true,"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","enableGlobalContextStore":true}]
These input_boolean helpers allows light to be turned on by motion.
I was hoping to migrate to new sun sensors in home assistant to enable this input_boolean.
I used “node-red-contrib-home-assistant-websocket : ha-time” with some offset, but i realised, that it never fires the event, because it’s always rescheduled to next day.
[{"id":"154911fee89f8bc6","type":"api-call-service","z":"5437f3d.da9f40c","name":"","server":"dcf02f05.b9371","version":5,"debugenabled":false,"domain":"input_boolean","service":"turn_off","areaId":[],"deviceId":[],"entityId":["input_boolean.light_state_kuchyne_strip_virtual"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1720,"y":1560,"wires":[[]]},{"id":"c427bd95b515fbd0","type":"api-call-service","z":"5437f3d.da9f40c","name":"","server":"dcf02f05.b9371","version":5,"debugenabled":false,"domain":"input_boolean","service":"turn_on","areaId":[],"deviceId":[],"entityId":["input_boolean.light_state_kuchyne_strip_virtual"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1720,"y":1620,"wires":[[]]},{"id":"e3d2f09d286d71ec","type":"ha-time","z":"5437f3d.da9f40c","name":"","server":"dcf02f05.b9371","version":2,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityId":"sensor.sun_next_rising","property":"","offset":"30","offsetType":"num","offsetUnits":"minutes","randomOffset":false,"repeatDaily":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"sunday":true,"monday":true,"tuesday":true,"wednesday":true,"thursday":true,"friday":true,"saturday":true,"debugenabled":false,"x":1360,"y":1560,"wires":[["154911fee89f8bc6"]]},{"id":"30714683d69db0da","type":"ha-time","z":"5437f3d.da9f40c","name":"","server":"dcf02f05.b9371","version":2,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityId":"sensor.sun_next_setting","property":"","offset":"-30","offsetType":"num","offsetUnits":"minutes","randomOffset":false,"repeatDaily":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"sunday":true,"monday":true,"tuesday":true,"wednesday":true,"thursday":true,"friday":true,"saturday":true,"debugenabled":false,"x":1360,"y":1620,"wires":[["c427bd95b515fbd0"]]},{"id":"dcf02f05.b9371","type":"server","name":"my_homeassistant","version":5,"addon":true,"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","enableGlobalContextStore":true}]
Is there a way to fire this events even with positive offset? I don’t want to delay messages in nodered like i do now.