Hello all… I need help with a flow i currently have…
The flow checks current humidity level in the bathroom… after a certain % of humidity, it turns on the extractor fan… However I want to add an alexa TTS announcing it will turn on the fan in a few seconds…
The issue is that it will keep announcing it after every new value the flow receives from the sensor.
How can I get it to just run once before the fan is switched on?
Here is a copy of my flow:
CODE:
[{"id":"671057a46157e955","type":"tab","label":"Kids Bathroom","disabled":false,"info":"","env":[]},{"id":"99a3ea719d15cabe","type":"server-state-changed","z":"671057a46157e955","name":"humudity sensor","server":"f68a11bd.94945","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.kids_bathroom_humidity","entityidfiltertype":"exact","outputinitially":true,"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"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":110,"y":90,"wires":[["3c4d71f8893e48a0"]]},{"id":"3c4d71f8893e48a0","type":"switch","z":"671057a46157e955","name":"humidty condition","property":"payload","propertyType":"msg","rules":[{"t":"gte","v":"70","vt":"str"},{"t":"lte","v":"60","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":330,"y":90,"wires":[["fbf99f5c10e15a6c","d58aaf9da2f40b63"],["aa01790411d50e35"]]},{"id":"7b306206d802edb7","type":"api-call-service","z":"671057a46157e955","name":"Turn on Fan","server":"f68a11bd.94945","version":3,"debugenabled":false,"service_domain":"homeassistant","service":"turn_on","entityId":"switch.kids_bathroom_fan","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":685,"y":75,"wires":[[]]},{"id":"aa01790411d50e35","type":"api-call-service","z":"671057a46157e955","name":"Turn off Fan","server":"f68a11bd.94945","version":3,"debugenabled":false,"service_domain":"homeassistant","service":"turn_off","entityId":"switch.kids_bathroom_fan","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":340,"y":165,"wires":[[]]},{"id":"d58aaf9da2f40b63","type":"function","z":"671057a46157e955","name":"","func":"msg.payload =\n\n\"The humidity in the bathroom is\"+\n\"{{states.sensor.kids_bathroom_humidity.state}}\" + \"%\" + \" , \" +\n\n\"I will be turning on the fan shortly\"\n\n\nreturn msg","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":615,"y":150,"wires":[["fabc54b1946e2c86"]]},{"id":"fabc54b1946e2c86","type":"api-call-service","z":"671057a46157e955","name":"Alexa Speak","server":"f68a11bd.94945","version":3,"debugenabled":false,"service_domain":"notify","service":"alexa_media_kids_bathroom_echo","entityId":"","data":"{\"message\":\"{{payload}}\",\"data\":{\"type\":\"tts\",\"volume_set\":95}}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":700,"y":210,"wires":[[]]},{"id":"fbf99f5c10e15a6c","type":"delay","z":"671057a46157e955","name":"","pauseType":"delay","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":525,"y":45,"wires":[["7b306206d802edb7"]]},{"id":"f68a11bd.94945","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"}]