Stuck in an automation

Hello good mornig for everyone

first of all forgive my english (mr.google)

I am “trying” an automation, I expose it:

I have a switch that I want for 10 seconds not to accept another order and if, physically (within 10 seconds) it changes state… to return to the previous state.

eg… turn_on (delay 10s) turn off-> turn ON

I’ve been trying everything for 1 week and it always ends in a loop or doesn’t work

Could anyone help me?

Thank you very much in advance

hola, buenos dias a todos

antes de nada perdonad mi ingles (mr.google)

estoy “intentando” una automatizacion, lo expongo:

tengo un interruptor, que quiero que durante 10 segundos no acepte otra orden y si, fisicamente (dentro de los 10 segundos) cambia de estado… que vuelva al estado anterior.

por ejemplo… turn_on (delay 10s) turn off-> turn ON

llevo 1 semana intentando de todo y siempre acaba en bucle o no funciona

podria alguien ayudarme?

muchas gracias por adelantado

Could you please post what you got so far? some code, not just pictures please… export the flow and paste it here.

Replace the Interrutor entity with your entity whithin the each blue node (three nodes total). I believe this is the behaviour you were expecting?

[{"id":"6b773c7df5fc80fc","type":"trigger-state","z":"878e74c2.7f39c8","name":"Interruptor no manual","server":"9405c3fe.d0a6c","version":2,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"Interruptor","entityidfiltertype":"exact","debugenabled":false,"constraints":[],"inputs":1,"outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","enableInput":true,"x":340,"y":220,"wires":[["c510a063594c7905"],[]]},{"id":"d56e54b9256cabfd","type":"change","z":"878e74c2.7f39c8","name":"enable","rules":[{"t":"set","p":"payload","pt":"msg","to":"enable","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":150,"y":200,"wires":[["6b773c7df5fc80fc"]]},{"id":"bddfeafcf1e46bdb","type":"change","z":"878e74c2.7f39c8","name":"dis","rules":[{"t":"set","p":"payload","pt":"msg","to":"disable","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":150,"y":240,"wires":[["6b773c7df5fc80fc"]]},{"id":"c510a063594c7905","type":"change","z":"878e74c2.7f39c8","name":"almacenar estado interruptor","rules":[{"t":"set","p":"interruptorRecovery","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":600,"y":160,"wires":[["9998f5e145905952"]]},{"id":"932a9bd24c7cd88d","type":"link in","z":"878e74c2.7f39c8","name":"link in 8","links":["84e3d12bb1b77be0"],"x":65,"y":200,"wires":[["d56e54b9256cabfd"]]},{"id":"ba3b76da609769a3","type":"link in","z":"878e74c2.7f39c8","name":"link in 9","links":["6c86fd4a87e19122","9998f5e145905952"],"x":65,"y":240,"wires":[["bddfeafcf1e46bdb"]]},{"id":"9998f5e145905952","type":"link out","z":"878e74c2.7f39c8","name":"link out 39","mode":"link","links":["ba3b76da609769a3","1b173490589085fc","3d8cc6d15ad3ec3e"],"x":755,"y":160,"wires":[]},{"id":"1b173490589085fc","type":"link in","z":"878e74c2.7f39c8","name":"link in 10","links":["9998f5e145905952"],"x":825,"y":160,"wires":[["0e1800bd78b45e34"]]},{"id":"0e1800bd78b45e34","type":"trigger","z":"878e74c2.7f39c8","name":"bloqueo de 10s","op1":"","op2":"1","op1type":"nul","op2type":"str","duration":"10","extend":false,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":940,"y":160,"wires":[["84e3d12bb1b77be0"]]},{"id":"84e3d12bb1b77be0","type":"link out","z":"878e74c2.7f39c8","name":"link out 40","mode":"link","links":["932a9bd24c7cd88d","c711148e7c5ee87f"],"x":1055,"y":160,"wires":[]},{"id":"9cb91ca41167dc99","type":"trigger-state","z":"878e74c2.7f39c8","name":"Interruptor cambio manual","server":"9405c3fe.d0a6c","version":2,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"Interruptor","entityidfiltertype":"exact","debugenabled":false,"constraints":[{"targetType":"this_entity","targetValue":"","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"is_not","comparatorValueDatatype":"jsonata","comparatorValue":"$flowContext(\"interruptorRecovery\")"}],"inputs":1,"outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","enableInput":true,"x":350,"y":400,"wires":[["8f2ff7078206266d"],[]]},{"id":"81f57face2503cf7","type":"change","z":"878e74c2.7f39c8","name":"enable","rules":[{"t":"set","p":"payload","pt":"msg","to":"enable","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":150,"y":380,"wires":[["9cb91ca41167dc99"]]},{"id":"c31b812bf5cb505f","type":"change","z":"878e74c2.7f39c8","name":"dis","rules":[{"t":"set","p":"payload","pt":"msg","to":"disable","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":150,"y":420,"wires":[["9cb91ca41167dc99"]]},{"id":"3d8cc6d15ad3ec3e","type":"link in","z":"878e74c2.7f39c8","name":"link in 11","links":["9998f5e145905952"],"x":65,"y":380,"wires":[["81f57face2503cf7"]]},{"id":"c711148e7c5ee87f","type":"link in","z":"878e74c2.7f39c8","name":"link in 12","links":["84e3d12bb1b77be0"],"x":65,"y":420,"wires":[["c31b812bf5cb505f"]]},{"id":"8f2ff7078206266d","type":"api-call-service","z":"878e74c2.7f39c8","name":"Recover state","server":"9405c3fe.d0a6c","version":5,"debugenabled":false,"domain":"switch","service":"turn_{{flow.interruptorRecovery}}","areaId":[],"deviceId":[],"entityId":["Interruptor#"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":580,"y":400,"wires":[[]]},{"id":"9d0e0d3b28b841e8","type":"comment","z":"878e74c2.7f39c8","name":"Cambio NO manual","info":"","x":150,"y":100,"wires":[]},{"id":"5d1aec98df49821f","type":"comment","z":"878e74c2.7f39c8","name":"Cambio manual durante los primeros 10s","info":"","x":220,"y":300,"wires":[]},{"id":"9405c3fe.d0a6c","type":"server","name":"Home Assistant","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}]

muchas gracias, hare pruebas a ver que tal