Using `presence-faker` to launch a script instead of lights?

Hi!

im using the excellent presence-faker for vacation mode like lights. I want to add some sounds to that via a script that sends some random noise to my speakers. im very new to both node-red and Home assistant and struggling a bit with which data I need to pass to the script via the presence-faker on payload and on topic

this is my current state

[{"id":"d7be37f135d48948","type":"server-state-changed","z":"967867dff605c38c","name":"vacation mode on/off?","server":"9b223c80.d6eb2","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.vacation_mode","entityidfiltertype":"exact","outputinitially":false,"state_type":"habool","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"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":"date"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"control","valueType":"str"}],"x":120,"y":2000,"wires":[["73148e7a242f812a"],["27352ec6f64a4569"]]},{"id":"7aa754cc41d2adc1","type":"api-call-service","z":"967867dff605c38c","name":"audio warning","server":"9b223c80.d6eb2","version":5,"debugenabled":false,"domain":"script","service":"alarm_voice_samples","areaId":[],"deviceId":[],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":820,"y":1980,"wires":[["549dff228d30650f"]]},{"id":"549dff228d30650f","type":"debug","z":"967867dff605c38c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1010,"y":1960,"wires":[]},{"id":"27352ec6f64a4569","type":"change","z":"967867dff605c38c","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"disable","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":2140,"wires":[["73148e7a242f812a"]]},{"id":"73148e7a242f812a","type":"presence-faker","z":"967867dff605c38c","name":"Random turn on lights","onPayload":"turn_on","onPayloadType":"str","onTopic":"script.alarm_voice_samples","offPayload":"turn_off","offPayloadType":"str","offTopic":"script.alarm_voice_samples","windowBegin":"19:00","windowEnd":"23:59","minDurationHours":0,"minDurationMinutes":"10","minDurationSeconds":0,"minDuration":"600","maxDurationHours":0,"maxDurationMinutes":"40","maxDurationSeconds":0,"maxDuration":"2400","minCount":"5","maxCount":"15","startupBehavior":"onStartup","actionOnDisable":"none","firstBlockType":"off","lastBlockType":"off","isLoggingEnabled":false,"x":560,"y":1980,"wires":[["7aa754cc41d2adc1"]]},{"id":"9b223c80.d6eb2","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"}]

anyone has time to help pointing me in the right direction?

thanks so much in advance

Z

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.