Help Presence Faker in Node Red with Suncron

Hi I am trying to use Presence Faker in Node Red but using the Suncron feature so it only works from Sunset to 23:59

The Presence Faker Module only has a single input, the Example shows the Suncron output feeding into the module.

Question How do you add the vacation Boolean input?

presence-faker

suncron

Regards, Dave

I added a state node prior to the suncron node. When the state of the vacation Boolean changes to On, the suncron node is fired.

EDIT: ops, sorry, I lied! That was the way I handled the faker node without suncron. I’ll be watching for a solution here as well.

This seems to be working for me

Are you able to stop (deactivate) presence faker when the vacation Boolean is turned off?

I’m using a text field as a trigger (Automatic/Manual/House Sitter/Vacation). When the text field evaluates to Vacation, the function passes a true or false to presence faker. When true, suncron messages are acted upon, when false, the node is set inactive. Here’s the flow I’m using. Debug nodes where left intact to aid with deciphering flows.

[{"id":"3064c1e4da03748d","type":"tab","label":"Vacation Lighting","disabled":false,"info":"","env":[]},{"id":"22f34ec4.9d3a22","type":"comment","z":"3064c1e4da03748d","name":"Vacation Lighting","info":"","x":140,"y":80,"wires":[]},{"id":"8234726a0a8aeb8b","type":"presence-faker","z":"3064c1e4da03748d","name":"Dining Room","onPayload":"turn_on","onPayloadType":"str","onTopic":"light.dining","offPayload":"turn_off","offPayloadType":"str","offTopic":"light.dining","windowBegin":"17:00","windowEnd":"20:30","minDurationHours":"1","minDurationMinutes":"15","minDurationSeconds":0,"minDuration":"4500","maxDurationHours":"1","maxDurationMinutes":"50","maxDurationSeconds":0,"maxDuration":"6600","minCount":1,"maxCount":1,"startupBehavior":"onMsg","actionOnDisable":"none","firstBlockType":"off","lastBlockType":"off","isLoggingEnabled":false,"x":410,"y":140,"wires":[["89e3fe975fc80b3e"]]},{"id":"89e3fe975fc80b3e","type":"api-call-service","z":"3064c1e4da03748d","name":"Call Service","server":"fcf9b76b.256a88","version":5,"debugenabled":false,"domain":"homeassistant","service":"{{payload}}","areaId":[],"deviceId":[],"entityId":["{{topic}}"],"data":"{}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":690,"y":200,"wires":[[]]},{"id":"b3b8cc883674dbc8","type":"link in","z":"3064c1e4da03748d","name":"Vacation Mode","links":["b47fd13aca9a9d36"],"x":235,"y":140,"wires":[["8234726a0a8aeb8b","e275f646cae085ee","a67f71989a8adc2a","5f8d5646.1c9208","8db08b64.688498","8eaef87f59cd0739"]]},{"id":"e275f646cae085ee","type":"presence-faker","z":"3064c1e4da03748d","name":"Kitchen Island","onPayload":"turn_on","onPayloadType":"str","onTopic":"switch.kitchen_island","offPayload":"turn_off","offPayloadType":"str","offTopic":"switch.kitchen_island","windowBegin":"17:00","windowEnd":"20:30","minDurationHours":"1","minDurationMinutes":"45","minDurationSeconds":0,"minDuration":"6300","maxDurationHours":"2","maxDurationMinutes":"10","maxDurationSeconds":0,"maxDuration":"7800","minCount":1,"maxCount":1,"startupBehavior":"onMsg","actionOnDisable":"none","firstBlockType":"off","lastBlockType":"off","isLoggingEnabled":false,"x":420,"y":200,"wires":[["89e3fe975fc80b3e"]]},{"id":"a67f71989a8adc2a","type":"presence-faker","z":"3064c1e4da03748d","name":"Kitchen Pots","onPayload":"turn_on","onPayloadType":"str","onTopic":"switch.kitchen_pot_lights","offPayload":"turn_off","offPayloadType":"str","offTopic":"switch.kitchen_pot_lights","windowBegin":"18:30","windowEnd":"20:30","minDurationHours":"1","minDurationMinutes":"30","minDurationSeconds":0,"minDuration":"5400","maxDurationHours":"1","maxDurationMinutes":"50","maxDurationSeconds":0,"maxDuration":"6600","minCount":1,"maxCount":1,"startupBehavior":"onMsg","actionOnDisable":"none","firstBlockType":"off","lastBlockType":"off","isLoggingEnabled":false,"x":410,"y":260,"wires":[["89e3fe975fc80b3e"]]},{"id":"8db08b64.688498","type":"presence-faker","z":"3064c1e4da03748d","name":"","onPayload":"ON","onPayloadType":"str","onTopic":"","offPayload":"OFF","offPayloadType":"str","offTopic":"","windowBegin":"08:00","windowEnd":"09:00","minDurationHours":0,"minDurationMinutes":"2","minDurationSeconds":0,"minDuration":"120","maxDurationHours":0,"maxDurationMinutes":"5","maxDurationSeconds":0,"maxDuration":"300","minCount":"2","maxCount":"5","startupBehavior":"onStartup","actionOnDisable":"none","firstBlockType":"off","lastBlockType":"off","isLoggingEnabled":false,"x":840,"y":440,"wires":[["472dd6f5346e9612"]]},{"id":"5f8d5646.1c9208","type":"suncron","z":"3064c1e4da03748d","name":"","lat":"89.9999978","lon":"-135.0000000","replay":false,"ejectScheduleOnUpdate":true,"sunrisePayload":"sunrise","sunrisePayloadType":"str","sunriseTopic":"","sunriseOffsetType":1,"sunriseOffsetHours":0,"sunriseOffsetMinutes":0,"sunriseOffset":0,"sunriseEndPayload":"","sunriseEndPayloadType":"str","sunriseEndTopic":"","sunriseEndOffsetType":1,"sunriseEndOffsetHours":0,"sunriseEndOffsetMinutes":0,"sunriseEndOffset":0,"goldenHourEndPayload":"","goldenHourEndPayloadType":"str","goldenHourEndTopic":"","goldenHourEndOffsetType":1,"goldenHourEndOffsetHours":0,"goldenHourEndOffsetMinutes":0,"goldenHourEndOffset":0,"solarNoonPayload":"","solarNoonPayloadType":"str","solarNoonTopic":"","solarNoonOffsetType":1,"solarNoonOffsetHours":0,"solarNoonOffsetMinutes":0,"solarNoonOffset":0,"goldenHourPayload":"","goldenHourPayloadType":"str","goldenHourTopic":"","goldenHourOffsetType":1,"goldenHourOffsetHours":0,"goldenHourOffsetMinutes":0,"goldenHourOffset":0,"sunsetStartPayload":"","sunsetStartPayloadType":"str","sunsetStartTopic":"","sunsetStartOffsetType":1,"sunsetStartOffsetHours":0,"sunsetStartOffsetMinutes":0,"sunsetStartOffset":0,"sunsetPayload":"sunset","sunsetPayloadType":"str","sunsetTopic":"","sunsetOffsetType":1,"sunsetOffsetHours":0,"sunsetOffsetMinutes":0,"sunsetOffset":0,"duskPayload":"","duskPayloadType":"str","duskTopic":"","duskOffsetType":1,"duskOffsetHours":0,"duskOffsetMinutes":0,"duskOffset":0,"nauticalDuskPayload":"","nauticalDuskPayloadType":"str","nauticalDuskTopic":"","nauticalDuskOffsetType":1,"nauticalDuskOffsetHours":0,"nauticalDuskOffsetMinutes":0,"nauticalDuskOffset":0,"nightPayload":"","nightPayloadType":"str","nightTopic":"","nightOffsetType":1,"nightOffsetHours":0,"nightOffsetMinutes":0,"nightOffset":0,"nadirPayload":"","nadirPayloadType":"str","nadirTopic":"","nadirOffsetType":1,"nadirOffsetHours":0,"nadirOffsetMinutes":0,"nadirOffset":0,"nightEndPayload":"","nightEndPayloadType":"str","nightEndTopic":"","nightEndOffsetType":1,"nightEndOffsetHours":0,"nightEndOffsetMinutes":0,"nightEndOffset":0,"nauticalDawnPayload":"","nauticalDawnPayloadType":"str","nauticalDawnTopic":"","nauticalDawnOffsetType":1,"nauticalDawnOffsetHours":0,"nauticalDawnOffsetMinutes":0,"nauticalDawnOffset":0,"dawnPayload":"","dawnPayloadType":"str","dawnTopic":"","dawnOffsetType":1,"dawnOffsetHours":0,"dawnOffsetMinutes":0,"dawnOffset":0,"x":440,"y":440,"wires":[["d2acfb9f.e06f98","b901e9f2b2df66bb","d218ef23e2f78e13"]]},{"id":"d2acfb9f.e06f98","type":"function","z":"3064c1e4da03748d","name":"PF config","func":"if (msg.topic != 'suncron:schedule') {\n    return\n}\n\nconst windowBeginEvent = 'sunrise'\nconst windowEndEvent = 'sunset'\n\nconst windowBegin = msg.payload[windowBeginEvent].cronTime.substring(11)\nconst windowEnd = msg.payload[windowEndEvent].cronTime.substring(11)\n\nreturn {\n    payload: {\n      windowBegin,\n      windowEnd\n    }\n}\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":620,"y":440,"wires":[["e810fc0f.7778d","8db08b64.688498","1e6193f549c9b935"]]},{"id":"e810fc0f.7778d","type":"debug","z":"3064c1e4da03748d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload.windowBegin","targetType":"msg","statusVal":"","statusType":"auto","x":880,"y":340,"wires":[]},{"id":"472dd6f5346e9612","type":"debug","z":"3064c1e4da03748d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1070,"y":440,"wires":[]},{"id":"b901e9f2b2df66bb","type":"debug","z":"3064c1e4da03748d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":630,"y":340,"wires":[]},{"id":"1e6193f549c9b935","type":"debug","z":"3064c1e4da03748d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload.windowEnd","targetType":"msg","statusVal":"","statusType":"auto","x":870,"y":400,"wires":[]},{"id":"9c542f26680edf65","type":"server-state-changed","z":"3064c1e4da03748d","name":"Listen For Control Mode Change","server":"fcf9b76b.256a88","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_select.control_mode","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","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"}],"x":210,"y":440,"wires":[["80dba302897ddb5f","63403d56989f8c38","5f8d5646.1c9208"]],"outputLabels":["Automatic"],"info":"Listen For Control Mode Change"},{"id":"80dba302897ddb5f","type":"function","z":"3064c1e4da03748d","name":"","func":"if(msg.payload == \"Vacation\")\n{\n    msg.payload=\"true\";\n    return [msg];}\nelse{\n    msg.payload=\"false\";\n    return [msg];}\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":500,"y":800,"wires":[["5e34b424562939a1","8db08b64.688498","8eaef87f59cd0739"]]},{"id":"5e34b424562939a1","type":"debug","z":"3064c1e4da03748d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":690,"y":800,"wires":[]},{"id":"63403d56989f8c38","type":"debug","z":"3064c1e4da03748d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":410,"y":640,"wires":[]},{"id":"d218ef23e2f78e13","type":"function","z":"3064c1e4da03748d","name":"PF config","func":"if (msg.topic != 'suncron:schedule') {\n    return\n}\n\nconst windowBeginEvent = 'sunset'\n\nconst windowBegin = msg.payload[windowBeginEvent].cronTime.substring(11)\n\nreturn {\n    payload: {\n      windowBegin\n    }\n}\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":620,"y":500,"wires":[["c59cac5debb276af","7cea2ad13a160f64","8eaef87f59cd0739"]]},{"id":"c59cac5debb276af","type":"debug","z":"3064c1e4da03748d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload.windowBegin","targetType":"msg","statusVal":"","statusType":"auto","x":880,"y":560,"wires":[]},{"id":"7cea2ad13a160f64","type":"debug","z":"3064c1e4da03748d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload.windowEnd","targetType":"msg","statusVal":"","statusType":"auto","x":870,"y":620,"wires":[]},{"id":"8eaef87f59cd0739","type":"presence-faker","z":"3064c1e4da03748d","name":"","onPayload":"ON","onPayloadType":"str","onTopic":"","offPayload":"OFF","offPayloadType":"str","offTopic":"","windowBegin":"08:00","windowEnd":"21:00","minDurationHours":0,"minDurationMinutes":"2","minDurationSeconds":0,"minDuration":"120","maxDurationHours":0,"maxDurationMinutes":"5","maxDurationSeconds":0,"maxDuration":"300","minCount":"2","maxCount":"5","startupBehavior":"onStartup","actionOnDisable":"none","firstBlockType":"off","lastBlockType":"off","isLoggingEnabled":false,"x":840,"y":500,"wires":[[]]},{"id":"fcf9b76b.256a88","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30"}]

Yes, Presence faker is looking for a True or False statement, so using a change node to change from on off to true false.

Worked ok last night, here is my flow, need to put in your own Long Lat in Suncron.

Not done much with node red so there maybe some shortcuts that can be done.

[{"id":"a1774f76.0cb69","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"2349eb2db35f76ca","type":"presence-faker","z":"a1774f76.0cb69","name":"Office Light Faker","onPayload":"on","onPayloadType":"str","onTopic":"on","offPayload":"off","offPayloadType":"str","offTopic":"off","windowBegin":"09:30","windowEnd":"23:59","minDurationHours":0,"minDurationMinutes":"5","minDurationSeconds":0,"minDuration":"300","maxDurationHours":0,"maxDurationMinutes":"30","maxDurationSeconds":0,"maxDuration":"1800","minCount":"2","maxCount":"6","startupBehavior":"onMsg","actionOnDisable":"off","firstBlockType":"on","lastBlockType":"off","isLoggingEnabled":false,"x":630,"y":360,"wires":[["ecdb325c1ad65130"]]},{"id":"d2acfb9f.e06f98","type":"function","z":"a1774f76.0cb69","name":"PF config","func":"if (msg.topic != 'suncron:schedule') {\n    return\n}\n\nconst windowBeginEvent = 'sunset'\nconst windowEndEvent = 'sunset'\n\nconst windowBegin = msg.payload[windowBeginEvent].cronTime.substring(11)\n\n\nreturn {\n    payload: {\n      windowBegin\n    }\n}\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":440,"y":660,"wires":[["2349eb2db35f76ca"]]},{"id":"5f8d5646.1c9208","type":"suncron","z":"a1774f76.0cb69","name":"","lat":"0","lon":"0","replay":false,"ejectScheduleOnUpdate":true,"sunrisePayload":"sunrise","sunrisePayloadType":"str","sunriseTopic":"","sunriseOffsetType":1,"sunriseOffsetHours":0,"sunriseOffsetMinutes":0,"sunriseOffset":0,"sunriseEndPayload":"","sunriseEndPayloadType":"str","sunriseEndTopic":"","sunriseEndOffsetType":1,"sunriseEndOffsetHours":0,"sunriseEndOffsetMinutes":0,"sunriseEndOffset":0,"goldenHourEndPayload":"","goldenHourEndPayloadType":"str","goldenHourEndTopic":"","goldenHourEndOffsetType":1,"goldenHourEndOffsetHours":0,"goldenHourEndOffsetMinutes":0,"goldenHourEndOffset":0,"solarNoonPayload":"","solarNoonPayloadType":"str","solarNoonTopic":"","solarNoonOffsetType":1,"solarNoonOffsetHours":0,"solarNoonOffsetMinutes":0,"solarNoonOffset":0,"goldenHourPayload":"","goldenHourPayloadType":"str","goldenHourTopic":"","goldenHourOffsetType":1,"goldenHourOffsetHours":0,"goldenHourOffsetMinutes":0,"goldenHourOffset":0,"sunsetStartPayload":"","sunsetStartPayloadType":"str","sunsetStartTopic":"","sunsetStartOffsetType":1,"sunsetStartOffsetHours":0,"sunsetStartOffsetMinutes":0,"sunsetStartOffset":0,"sunsetPayload":"sunset","sunsetPayloadType":"str","sunsetTopic":"","sunsetOffsetType":"-1","sunsetOffsetHours":"0","sunsetOffsetMinutes":"0","sunsetOffset":"0","duskPayload":"","duskPayloadType":"str","duskTopic":"","duskOffsetType":1,"duskOffsetHours":0,"duskOffsetMinutes":0,"duskOffset":0,"nauticalDuskPayload":"","nauticalDuskPayloadType":"str","nauticalDuskTopic":"","nauticalDuskOffsetType":1,"nauticalDuskOffsetHours":0,"nauticalDuskOffsetMinutes":0,"nauticalDuskOffset":0,"nightPayload":"","nightPayloadType":"str","nightTopic":"","nightOffsetType":1,"nightOffsetHours":0,"nightOffsetMinutes":0,"nightOffset":0,"nadirPayload":"","nadirPayloadType":"str","nadirTopic":"","nadirOffsetType":1,"nadirOffsetHours":0,"nadirOffsetMinutes":0,"nadirOffset":0,"nightEndPayload":"","nightEndPayloadType":"str","nightEndTopic":"","nightEndOffsetType":1,"nightEndOffsetHours":0,"nightEndOffsetMinutes":0,"nightEndOffset":0,"nauticalDawnPayload":"","nauticalDawnPayloadType":"str","nauticalDawnTopic":"","nauticalDawnOffsetType":1,"nauticalDawnOffsetHours":0,"nauticalDawnOffsetMinutes":0,"nauticalDawnOffset":0,"dawnPayload":"","dawnPayloadType":"str","dawnTopic":"","dawnOffsetType":1,"dawnOffsetHours":0,"dawnOffsetMinutes":0,"dawnOffset":0,"x":260,"y":660,"wires":[["d2acfb9f.e06f98"]]},{"id":"1d196d049c822625","type":"server-state-changed","z":"a1774f76.0cb69","name":"Away Lights Random Mode","server":"659eca85f428414e","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.lights_away_random","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":"1","forType":"num","forUnits":"seconds","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":200,"y":440,"wires":[["7c2fb603.bd9348"]]},{"id":"7c2fb603.bd9348","type":"change","z":"a1774f76.0cb69","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"true","tot":"bool"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":90,"wires":[["2349eb2db35f76ca"]]},{"id":"006b01541d5e3da5","type":"api-call-service","z":"a1774f76.0cb69","name":"Phil Light On","server":"659eca85f428414e","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.philips"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":990,"y":560,"wires":[[]]},{"id":"b05c3246bc413dfd","type":"api-call-service","z":"a1774f76.0cb69","name":"Phil Light Off","server":"659eca85f428414e","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":[],"entityId":["light.philips"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":990,"y":660,"wires":[[]]},{"id":"ecdb325c1ad65130","type":"switch","z":"a1774f76.0cb69","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":730,"y":520,"wires":[["006b01541d5e3da5"],["b05c3246bc413dfd"]]},{"id":"659eca85f428414e","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30"}]

Nice idea!

I downloaded your code to see how it works. Thanks for posting. Here’s a cleaned up version of my code.

[{"id":"8234726a0a8aeb8b","type":"presence-faker","z":"3064c1e4da03748d","name":"Dining Room","onPayload":"turn_on","onPayloadType":"str","onTopic":"light.dining","offPayload":"turn_off","offPayloadType":"str","offTopic":"light.dining","windowBegin":"17:00","windowEnd":"20:30","minDurationHours":"1","minDurationMinutes":"15","minDurationSeconds":0,"minDuration":"4500","maxDurationHours":"1","maxDurationMinutes":"50","maxDurationSeconds":0,"maxDuration":"6600","minCount":1,"maxCount":1,"startupBehavior":"onMsg","actionOnDisable":"off","firstBlockType":"off","lastBlockType":"off","isLoggingEnabled":false,"x":870,"y":140,"wires":[["89e3fe975fc80b3e"]]},{"id":"89e3fe975fc80b3e","type":"api-call-service","z":"3064c1e4da03748d","name":"Call Service","server":"fcf9b76b.256a88","version":5,"debugenabled":false,"domain":"homeassistant","service":"{{payload}}","areaId":[],"deviceId":[],"entityId":["{{topic}}"],"data":"{}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1090,"y":200,"wires":[[]]},{"id":"e275f646cae085ee","type":"presence-faker","z":"3064c1e4da03748d","name":"Kitchen Island","onPayload":"turn_on","onPayloadType":"str","onTopic":"switch.kitchen_island","offPayload":"turn_off","offPayloadType":"str","offTopic":"switch.kitchen_island","windowBegin":"17:00","windowEnd":"20:30","minDurationHours":"1","minDurationMinutes":"45","minDurationSeconds":0,"minDuration":"6300","maxDurationHours":"2","maxDurationMinutes":"10","maxDurationSeconds":0,"maxDuration":"7800","minCount":1,"maxCount":1,"startupBehavior":"onMsg","actionOnDisable":"off","firstBlockType":"off","lastBlockType":"off","isLoggingEnabled":false,"x":880,"y":200,"wires":[["89e3fe975fc80b3e"]]},{"id":"a67f71989a8adc2a","type":"presence-faker","z":"3064c1e4da03748d","name":"Kitchen Pots","onPayload":"turn_on","onPayloadType":"str","onTopic":"switch.kitchen_pot_lights","offPayload":"turn_off","offPayloadType":"str","offTopic":"switch.kitchen_pot_lights","windowBegin":"18:30","windowEnd":"20:30","minDurationHours":"1","minDurationMinutes":"30","minDurationSeconds":0,"minDuration":"5400","maxDurationHours":"1","maxDurationMinutes":"50","maxDurationSeconds":0,"maxDuration":"6600","minCount":1,"maxCount":1,"startupBehavior":"onMsg","actionOnDisable":"off","firstBlockType":"off","lastBlockType":"off","isLoggingEnabled":false,"x":870,"y":260,"wires":[["89e3fe975fc80b3e"]]},{"id":"5f8d5646.1c9208","type":"suncron","z":"3064c1e4da03748d","name":"","lat":"84.9999978","lon":"-135.000533","replay":false,"ejectScheduleOnUpdate":true,"sunrisePayload":"sunrise","sunrisePayloadType":"str","sunriseTopic":"","sunriseOffsetType":1,"sunriseOffsetHours":0,"sunriseOffsetMinutes":0,"sunriseOffset":0,"sunriseEndPayload":"","sunriseEndPayloadType":"str","sunriseEndTopic":"","sunriseEndOffsetType":1,"sunriseEndOffsetHours":0,"sunriseEndOffsetMinutes":0,"sunriseEndOffset":0,"goldenHourEndPayload":"","goldenHourEndPayloadType":"str","goldenHourEndTopic":"","goldenHourEndOffsetType":1,"goldenHourEndOffsetHours":0,"goldenHourEndOffsetMinutes":0,"goldenHourEndOffset":0,"solarNoonPayload":"","solarNoonPayloadType":"str","solarNoonTopic":"","solarNoonOffsetType":1,"solarNoonOffsetHours":0,"solarNoonOffsetMinutes":0,"solarNoonOffset":0,"goldenHourPayload":"","goldenHourPayloadType":"str","goldenHourTopic":"","goldenHourOffsetType":1,"goldenHourOffsetHours":0,"goldenHourOffsetMinutes":0,"goldenHourOffset":0,"sunsetStartPayload":"","sunsetStartPayloadType":"str","sunsetStartTopic":"","sunsetStartOffsetType":1,"sunsetStartOffsetHours":0,"sunsetStartOffsetMinutes":0,"sunsetStartOffset":0,"sunsetPayload":"sunset","sunsetPayloadType":"str","sunsetTopic":"","sunsetOffsetType":1,"sunsetOffsetHours":0,"sunsetOffsetMinutes":0,"sunsetOffset":0,"duskPayload":"","duskPayloadType":"str","duskTopic":"","duskOffsetType":1,"duskOffsetHours":0,"duskOffsetMinutes":0,"duskOffset":0,"nauticalDuskPayload":"","nauticalDuskPayloadType":"str","nauticalDuskTopic":"","nauticalDuskOffsetType":1,"nauticalDuskOffsetHours":0,"nauticalDuskOffsetMinutes":0,"nauticalDuskOffset":0,"nightPayload":"","nightPayloadType":"str","nightTopic":"","nightOffsetType":1,"nightOffsetHours":0,"nightOffsetMinutes":0,"nightOffset":0,"nadirPayload":"","nadirPayloadType":"str","nadirTopic":"","nadirOffsetType":1,"nadirOffsetHours":0,"nadirOffsetMinutes":0,"nadirOffset":0,"nightEndPayload":"","nightEndPayloadType":"str","nightEndTopic":"","nightEndOffsetType":1,"nightEndOffsetHours":0,"nightEndOffsetMinutes":0,"nightEndOffset":0,"nauticalDawnPayload":"","nauticalDawnPayloadType":"str","nauticalDawnTopic":"","nauticalDawnOffsetType":1,"nauticalDawnOffsetHours":0,"nauticalDawnOffsetMinutes":0,"nauticalDawnOffset":0,"dawnPayload":"","dawnPayloadType":"str","dawnTopic":"","dawnOffsetType":1,"dawnOffsetHours":0,"dawnOffsetMinutes":0,"dawnOffset":0,"x":360,"y":300,"wires":[["d2acfb9f.e06f98","d218ef23e2f78e13","48ed18acc78c230d"]]},{"id":"d2acfb9f.e06f98","type":"function","z":"3064c1e4da03748d","name":"PF config - Dining Room","func":"if (msg.topic != 'suncron:schedule') {\n    return\n}\n\nconst windowBeginEvent = 'sunset'\nconst windowBegin = msg.payload[windowBeginEvent].cronTime.substring(11)\n\nconst windowEnd = \"19:45\"\n\nreturn {\n    payload: {\n      windowBegin,\n      windowEnd\n    }\n}\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":610,"y":300,"wires":[["8234726a0a8aeb8b"]]},{"id":"d218ef23e2f78e13","type":"function","z":"3064c1e4da03748d","name":"PF config - Kitchen Island","func":"if (msg.topic != 'suncron:schedule') {\n    return\n}\n\nconst windowBeginEvent = 'sunset'\nconst windowBegin = msg.payload[windowBeginEvent].cronTime.substring(11)\n\nconst windowEnd = \"20:45\"\n\nreturn {\n    payload: {\n      windowBegin,\n      windowEnd\n    }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":610,"y":340,"wires":[["e275f646cae085ee"]]},{"id":"48ed18acc78c230d","type":"function","z":"3064c1e4da03748d","name":"PF config - Kitchen Island","func":"if (msg.topic != 'suncron:schedule') {\n    return\n}\n\nconst windowBeginEvent = 'sunset'\nconst windowBegin = msg.payload[windowBeginEvent].cronTime.substring(11)\n\nconst windowEnd = \"20:45\"\n\nreturn {\n    payload: {\n      windowBegin,\n      windowEnd\n    }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":610,"y":380,"wires":[["a67f71989a8adc2a"]]},{"id":"f70ac3fdc2fb0906","type":"link in","z":"3064c1e4da03748d","name":"","links":["b47fd13aca9a9d36"],"x":225,"y":140,"wires":[["8234726a0a8aeb8b","e275f646cae085ee","a67f71989a8adc2a","5f8d5646.1c9208"]]},{"id":"fcf9b76b.256a88","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30"}]

A different flow evaluates a “Control Mode” (Automatic/Manual/House Sitter/Vacation). If it’s set to Vacation a true state is passed to this flow via the “Link In”, enabling presence faker. If set to any other condition, a false state is sent to this flow via the “Link In”, disabling presence faker.

I’m also battling with the combination of:

  • Vacation mode helper, just a manual switch
  • Suncron, to make sure the lights only turn on after sunset
  • Presence faker, to have 1 light randomly turn on after SUNCRON sunset and fixed end time

I’ve read so many post, but I think I must have a shortcut in my brains :slight_smile:

What I have so far

[{"id":"56bade6e6032ed4a","type":"tab","label":"Flow 2","disabled":false,"info":"","env":[]},{"id":"a41d9b31.610738","type":"debug","z":"56bade6e6032ed4a","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1070,"y":320,"wires":[]},{"id":"8bbde663.b0b528","type":"api-call-service","z":"56bade6e6032ed4a","name":"Toggle","server":"f401242c.86dbe8","version":5,"debugenabled":true,"domain":"homeassistant","service":"{{payload}}","areaId":[],"deviceId":[],"entityId":["{{topic}}"],"data":"{}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"","output_location_type":"none","x":890,"y":320,"wires":[["a41d9b31.610738"]]},{"id":"aedd9ffc.64eb2","type":"presence-faker","z":"56bade6e6032ed4a","name":"switch.0xa4c13865e61d6050 (1)","onPayload":"turn_on","onPayloadType":"str","onTopic":"switch.0xa4c13865e61d6050","offPayload":"turn_off","offPayloadType":"str","offTopic":"switch.0xa4c13865e61d6050","windowBegin":"17:30","windowEnd":"23:00","minDurationHours":0,"minDurationMinutes":"15","minDurationSeconds":"15","minDuration":"915","maxDurationHours":"2","maxDurationMinutes":"2","maxDurationSeconds":"2","maxDuration":"7322","minCount":"1","maxCount":"5","startupBehavior":"onMsg","actionOnDisable":"none","isLoggingEnabled":false,"x":640,"y":320,"wires":[["8bbde663.b0b528"]]},{"id":"78b2abf.6fe9754","type":"server-state-changed","z":"56bade6e6032ed4a","name":"Check Vacation","server":"f401242c.86dbe8","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.vacationmode","entityidfiltertype":"exact","outputinitially":true,"state_type":"habool","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"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":140,"y":320,"wires":[["2c0b2f4bb28712b0"]]},{"id":"2c0b2f4bb28712b0","type":"suncron","z":"56bade6e6032ed4a","name":"","lat":"52.378649","lon":"5.182449","replay":false,"ejectScheduleOnUpdate":true,"sunrisePayload":"sunrise","sunrisePayloadType":"str","sunriseTopic":"","sunriseOffsetType":1,"sunriseOffsetHours":0,"sunriseOffsetMinutes":0,"sunriseOffset":0,"sunriseEndPayload":"","sunriseEndPayloadType":"str","sunriseEndTopic":"","sunriseEndOffsetType":1,"sunriseEndOffsetHours":0,"sunriseEndOffsetMinutes":0,"sunriseEndOffset":0,"goldenHourEndPayload":"","goldenHourEndPayloadType":"str","goldenHourEndTopic":"","goldenHourEndOffsetType":1,"goldenHourEndOffsetHours":0,"goldenHourEndOffsetMinutes":0,"goldenHourEndOffset":0,"solarNoonPayload":"","solarNoonPayloadType":"str","solarNoonTopic":"","solarNoonOffsetType":1,"solarNoonOffsetHours":0,"solarNoonOffsetMinutes":0,"solarNoonOffset":0,"goldenHourPayload":"","goldenHourPayloadType":"str","goldenHourTopic":"","goldenHourOffsetType":1,"goldenHourOffsetHours":0,"goldenHourOffsetMinutes":0,"goldenHourOffset":0,"sunsetStartPayload":"","sunsetStartPayloadType":"str","sunsetStartTopic":"","sunsetStartOffsetType":1,"sunsetStartOffsetHours":0,"sunsetStartOffsetMinutes":0,"sunsetStartOffset":0,"sunsetPayload":"sunset","sunsetPayloadType":"str","sunsetTopic":"","sunsetOffsetType":1,"sunsetOffsetHours":0,"sunsetOffsetMinutes":0,"sunsetOffset":0,"duskPayload":"","duskPayloadType":"str","duskTopic":"","duskOffsetType":1,"duskOffsetHours":0,"duskOffsetMinutes":0,"duskOffset":0,"nauticalDuskPayload":"","nauticalDuskPayloadType":"str","nauticalDuskTopic":"","nauticalDuskOffsetType":1,"nauticalDuskOffsetHours":0,"nauticalDuskOffsetMinutes":0,"nauticalDuskOffset":0,"nightPayload":"","nightPayloadType":"str","nightTopic":"","nightOffsetType":1,"nightOffsetHours":0,"nightOffsetMinutes":0,"nightOffset":0,"nadirPayload":"","nadirPayloadType":"str","nadirTopic":"","nadirOffsetType":1,"nadirOffsetHours":0,"nadirOffsetMinutes":0,"nadirOffset":0,"nightEndPayload":"","nightEndPayloadType":"str","nightEndTopic":"","nightEndOffsetType":1,"nightEndOffsetHours":0,"nightEndOffsetMinutes":0,"nightEndOffset":0,"nauticalDawnPayload":"","nauticalDawnPayloadType":"str","nauticalDawnTopic":"","nauticalDawnOffsetType":1,"nauticalDawnOffsetHours":0,"nauticalDawnOffsetMinutes":0,"nauticalDawnOffset":0,"dawnPayload":"","dawnPayloadType":"str","dawnTopic":"","dawnOffsetType":1,"dawnOffsetHours":0,"dawnOffsetMinutes":0,"dawnOffset":0,"x":360,"y":320,"wires":[["aedd9ffc.64eb2"]]},{"id":"f401242c.86dbe8","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30"}]

Could somebody please assist?

1 Like

I’m willing to have a look for you but your posted code needs to be formatted using a code block before I’m able to copy it.

Finally figured out how to use the code :upside_down_face:, so see my initial post

@DaSuperGrover

I’ve copied your code to my instance on Node Red so that I may look at later today. One thing I noticed straight away is the absence of a command to initiate the Presence Faker node. There should be a link from the output of the Check Vacation node to the input of the Faker node. This link will control when the node should be active. True for active and False for inactive.

I am really not that familiar with Node Red.

Now the longer nights are here I feel this if you are using Sunset as your start time you really could do with more On & Off’s throughout your total period.

In the document there is a Dynamic Configuration avaliable

{
    "windowBegin": "00:00",
    "windowEnd": "23:59:59",
    "minDuration": 60,
    "maxDuration": 600,
    "minCount": 10,
    "maxCount": 25
}

Not sure how I feed that into the Presense Faker Module?

Any help appriciated.

Re Dave

my presence faker works, BUT it leaves all the light ON at the end.
Any idea how to solve that?

In the Presence Faker node, change the “last block” setting to “OFF message” if you want everything off.

Thanks @doctorkb that works for me!

Now I have a next question.
I have a flag that trigger the presence faker called “simulation lights”
When this is ON, the flow starts
This works
But, when I am on vacation and the simulation_lights I leave it ON, at night the process of presence faker starts perfect, but when it ends with a text " cycle completed"
So, I needs to turn off and turn on again the smilutation_lights flag so it works agian at night

How can I fix this?
Thanks
Here is the code

[{"id":"5e526835.c7bad8","type":"tab","label":"Simulation LIghts","disabled":false,"info":""},{"id":"198d6a70.3b0876","type":"presence-faker","z":"5e526835.c7bad8","name":"Living","onPayload":"turn_on","onPayloadType":"str","onTopic":"switch.luz_living","offPayload":"turn_off","offPayloadType":"str","offTopic":"switch.luz_living","windowBegin":"18:30","windowEnd":"23:45","minDurationHours":0,"minDurationMinutes":"1","minDurationSeconds":"5","minDuration":"65","maxDurationHours":0,"maxDurationMinutes":"7","maxDurationSeconds":"10","maxDuration":"430","minCount":1,"maxCount":"5","startupBehavior":"onMsg","actionOnDisable":"off","firstBlockType":"off","lastBlockType":"off","isLoggingEnabled":false,"x":390,"y":80,"wires":[["62b8938c.36298c"]]},{"id":"62b8938c.36298c","type":"api-call-service","z":"5e526835.c7bad8","name":"","server":"7955c4ca.4bf5fc","version":5,"debugenabled":false,"domain":"homeassistant","service":"{{payload}}","areaId":[],"deviceId":[],"entityId":["{{topic}}"],"data":"{}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"topic","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","output_location":"topic","output_location_type":"msg","x":780,"y":160,"wires":[[]]},{"id":"5c53b535.e813dc","type":"presence-faker","z":"5e526835.c7bad8","name":"Foco jardĂ­n ","onPayload":"turn_on","onPayloadType":"str","onTopic":"light.foco_jardin_2","offPayload":"turn_off","offPayloadType":"str","offTopic":"light.foco_jardin_2","windowBegin":"20:00","windowEnd":"23:50","minDurationHours":0,"minDurationMinutes":"5","minDurationSeconds":"5","minDuration":"305","maxDurationHours":0,"maxDurationMinutes":"15","maxDurationSeconds":"10","maxDuration":"910","minCount":1,"maxCount":"7","startupBehavior":"onMsg","actionOnDisable":"off","firstBlockType":"off","lastBlockType":"off","isLoggingEnabled":false,"x":410,"y":140,"wires":[["62b8938c.36298c"]]},{"id":"19104253.fea67e","type":"presence-faker","z":"5e526835.c7bad8","name":"Master Room","onPayload":"turn_on","onPayloadType":"str","onTopic":"light.master_room","offPayload":"turn_off","offPayloadType":"str","offTopic":"light.master_room","windowBegin":"19:30","windowEnd":"23:45","minDurationHours":0,"minDurationMinutes":"3","minDurationSeconds":"5","minDuration":"185","maxDurationHours":0,"maxDurationMinutes":"5","maxDurationSeconds":"10","maxDuration":"310","minCount":1,"maxCount":"15","startupBehavior":"onMsg","actionOnDisable":"off","firstBlockType":"off","lastBlockType":"off","isLoggingEnabled":false,"x":420,"y":220,"wires":[["62b8938c.36298c"]]},{"id":"6c94472.0d711b8","type":"presence-faker","z":"5e526835.c7bad8","name":"Comedor","onPayload":"turn_on","onPayloadType":"str","onTopic":"switch.comedor_2","offPayload":"turn_off","offPayloadType":"str","offTopic":"switch.comedor_2","windowBegin":"19:30","windowEnd":"23:30","minDurationHours":0,"minDurationMinutes":"3","minDurationSeconds":"5","minDuration":"185","maxDurationHours":0,"maxDurationMinutes":"15","maxDurationSeconds":"10","maxDuration":"910","minCount":1,"maxCount":"10","startupBehavior":"onMsg","actionOnDisable":"off","firstBlockType":"off","lastBlockType":"off","isLoggingEnabled":false,"x":400,"y":280,"wires":[["62b8938c.36298c"]]},{"id":"b4c7f71c.858738","type":"server-state-changed","z":"5e526835.c7bad8","name":"Simulation","server":"7955c4ca.4bf5fc","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.simulation_lights","entityidfiltertype":"exact","outputinitially":false,"state_type":"habool","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"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":120,"y":280,"wires":[["198d6a70.3b0876","5c53b535.e813dc","19104253.fea67e","6c94472.0d711b8","2db9bad6.361376","5e9d6303.07a06c","7e0faeed.03c64","23e04710.c44048","38439a65.2058e6","4b6dcff2.fa37b","df13cfb2411d4141","81110a7de3a8a47b","1a9910db5d2f173e"]]},{"id":"2db9bad6.361376","type":"presence-faker","z":"5e526835.c7bad8","name":"Salva","onPayload":"turn_on","onPayloadType":"str","onTopic":"switch.luz_salvador_2","offPayload":"turn_off","offPayloadType":"str","offTopic":"switch.luz_salvador_2","windowBegin":"19:30","windowEnd":"23:10","minDurationHours":0,"minDurationMinutes":"3","minDurationSeconds":"5","minDuration":"185","maxDurationHours":0,"maxDurationMinutes":"5","maxDurationSeconds":"10","maxDuration":"310","minCount":1,"maxCount":"10","startupBehavior":"onMsg","actionOnDisable":"off","firstBlockType":"off","lastBlockType":"off","isLoggingEnabled":false,"x":390,"y":340,"wires":[["62b8938c.36298c"]]},{"id":"5e9d6303.07a06c","type":"presence-faker","z":"5e526835.c7bad8","name":"Guille","onPayload":"turn_on","onPayloadType":"str","onTopic":"switch.luz_guillermo","offPayload":"turn_off","offPayloadType":"str","offTopic":"switch.luz_guillermo","windowBegin":"19:30","windowEnd":"23:30","minDurationHours":0,"minDurationMinutes":"3","minDurationSeconds":"5","minDuration":"185","maxDurationHours":0,"maxDurationMinutes":"5","maxDurationSeconds":"10","maxDuration":"310","minCount":1,"maxCount":"10","startupBehavior":"onMsg","actionOnDisable":"off","firstBlockType":"off","lastBlockType":"off","isLoggingEnabled":false,"x":390,"y":400,"wires":[["62b8938c.36298c"]]},{"id":"7e0faeed.03c64","type":"presence-faker","z":"5e526835.c7bad8","name":"Bano","onPayload":"turn_on","onPayloadType":"str","onTopic":"switch.bano_techo","offPayload":"turn_off","offPayloadType":"str","offTopic":"switch.bano_techo","windowBegin":"19:30","windowEnd":"23:30","minDurationHours":0,"minDurationMinutes":"3","minDurationSeconds":"5","minDuration":"185","maxDurationHours":0,"maxDurationMinutes":"5","maxDurationSeconds":"10","maxDuration":"310","minCount":1,"maxCount":"10","startupBehavior":"onMsg","actionOnDisable":"off","firstBlockType":"off","lastBlockType":"off","isLoggingEnabled":false,"x":390,"y":460,"wires":[["62b8938c.36298c"]]},{"id":"23e04710.c44048","type":"presence-faker","z":"5e526835.c7bad8","name":"Pasillo","onPayload":"turn_on","onPayloadType":"str","onTopic":"switch.luz_pasillo_2","offPayload":"turn_off","offPayloadType":"str","offTopic":"switch.luz_pasillo_2","windowBegin":"19:30","windowEnd":"23:30","minDurationHours":0,"minDurationMinutes":"3","minDurationSeconds":"5","minDuration":"185","maxDurationHours":0,"maxDurationMinutes":"5","maxDurationSeconds":"10","maxDuration":"310","minCount":1,"maxCount":"10","startupBehavior":"onMsg","actionOnDisable":"off","firstBlockType":"off","lastBlockType":"off","isLoggingEnabled":false,"x":390,"y":520,"wires":[["62b8938c.36298c"]]},{"id":"38439a65.2058e6","type":"presence-faker","z":"5e526835.c7bad8","name":"Downlights Cocina","onPayload":"turn_on","onPayloadType":"str","onTopic":"light.downlights_cocina","offPayload":"turn_off","offPayloadType":"str","offTopic":"light.downlights_cocina","windowBegin":"19:30","windowEnd":"23:30","minDurationHours":0,"minDurationMinutes":"3","minDurationSeconds":"5","minDuration":"185","maxDurationHours":0,"maxDurationMinutes":"5","maxDurationSeconds":"10","maxDuration":"310","minCount":1,"maxCount":"10","startupBehavior":"onMsg","actionOnDisable":"off","firstBlockType":"off","lastBlockType":"off","isLoggingEnabled":false,"x":410,"y":640,"wires":[["62b8938c.36298c"]]},{"id":"4b6dcff2.fa37b","type":"presence-faker","z":"5e526835.c7bad8","name":"Studio","onPayload":"turn_on","onPayloadType":"str","onTopic":"light.studio_2","offPayload":"turn_off","offPayloadType":"str","offTopic":"light.studio_2","windowBegin":"19:30","windowEnd":"23:30","minDurationHours":0,"minDurationMinutes":"3","minDurationSeconds":"5","minDuration":"185","maxDurationHours":0,"maxDurationMinutes":"5","maxDurationSeconds":"10","maxDuration":"310","minCount":1,"maxCount":"10","startupBehavior":"onMsg","actionOnDisable":"off","firstBlockType":"off","lastBlockType":"off","isLoggingEnabled":false,"x":390,"y":580,"wires":[["62b8938c.36298c"]]},{"id":"df13cfb2411d4141","type":"presence-faker","z":"5e526835.c7bad8","name":"Pasillo OverNight","onPayload":"turn_on","onPayloadType":"str","onTopic":"switch.luz_pasillo_2","offPayload":"turn_off","offPayloadType":"str","offTopic":"switch.luz_pasillo_2","windowBegin":"00:01","windowEnd":"05:00","minDurationHours":0,"minDurationMinutes":"1","minDurationSeconds":"5","minDuration":"65","maxDurationHours":0,"maxDurationMinutes":"3","maxDurationSeconds":"10","maxDuration":"190","minCount":1,"maxCount":"30","startupBehavior":"onMsg","actionOnDisable":"off","firstBlockType":"off","lastBlockType":"off","isLoggingEnabled":false,"x":430,"y":720,"wires":[["62b8938c.36298c"]]},{"id":"81110a7de3a8a47b","type":"presence-faker","z":"5e526835.c7bad8","name":"Master Room OverNight","onPayload":"turn_on","onPayloadType":"str","onTopic":"light.master_room","offPayload":"turn_off","offPayloadType":"str","offTopic":"light.master_room","windowBegin":"00:01","windowEnd":"04:45","minDurationHours":0,"minDurationMinutes":"1","minDurationSeconds":"5","minDuration":"65","maxDurationHours":0,"maxDurationMinutes":"3","maxDurationSeconds":"10","maxDuration":"190","minCount":1,"maxCount":"20","startupBehavior":"onMsg","actionOnDisable":"off","firstBlockType":"off","lastBlockType":"off","isLoggingEnabled":false,"x":450,"y":780,"wires":[["62b8938c.36298c"]]},{"id":"1a9910db5d2f173e","type":"presence-faker","z":"5e526835.c7bad8","name":"Foco jardĂ­n OverNight","onPayload":"turn_on","onPayloadType":"str","onTopic":"light.foco_jardin_2","offPayload":"turn_off","offPayloadType":"str","offTopic":"light.foco_jardin_2","windowBegin":"00:01","windowEnd":"05:00","minDurationHours":0,"minDurationMinutes":"2","minDurationSeconds":"5","minDuration":"125","maxDurationHours":0,"maxDurationMinutes":"10","maxDurationSeconds":"10","maxDuration":"610","minCount":1,"maxCount":"40","startupBehavior":"onMsg","actionOnDisable":"off","firstBlockType":"off","lastBlockType":"off","isLoggingEnabled":false,"x":440,"y":840,"wires":[["62b8938c.36298c"]]},{"id":"7955c4ca.4bf5fc","type":"server","name":"Home Assistant","version":4,"addon":false,"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"}]

Have you tried leaving it for a second night to see what happens? I understood it would come back on the next day.