Why doesn't a flow work and another does, being the same?

Hello, I have a flow that I have copied (changing the entities) and although the zones are the same, it does not work in one.
I thought that the switch or the presence sensor would be bad, but I have verified that they work. What am I doing wrong?

[{"id":"718fdd297bb4fec2","type":"tab","label":"Entrada Automatismo","disabled":false,"info":"","env":[]},{"id":"0574934a842d86b3","type":"api-call-service","z":"718fdd297bb4fec2","name":"Encender luz","server":"2e0f828a.d95dbe","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.conmutador_entrada"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"","output_location_type":"none","x":450,"y":140,"wires":[["616c40b048ed5826","42c7990c36c6784e"]]},{"id":"09707e72f60b88f5","type":"delay","z":"718fdd297bb4fec2","name":"","pauseType":"delay","timeout":"60","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":440,"y":300,"wires":[["69a108d97cdd0581","3a3319ec4e2f5e4d"]]},{"id":"69a108d97cdd0581","type":"api-call-service","z":"718fdd297bb4fec2","name":"Apagar luz","server":"2e0f828a.d95dbe","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.conmutador_entrada"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"","output_location_type":"none","x":670,"y":300,"wires":[["7b29f8a330158aec"]]},{"id":"616c40b048ed5826","type":"change","z":"718fdd297bb4fec2","name":"Resetear delay","rules":[{"t":"set","p":"reset","pt":"msg","to":"now","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":120,"wires":[["09707e72f60b88f5","3a3319ec4e2f5e4d"]]},{"id":"5d23ee08feb90ca7","type":"server-state-changed","z":"718fdd297bb4fec2","name":"Sensor Entrada","server":"2e0f828a.d95dbe","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.sensor_movimiento_entrada_occupancy","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"0","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":140,"y":220,"wires":[["02d9c0131c7ce0d2"],["53b336bcc63a3047"]]},{"id":"02d9c0131c7ce0d2","type":"time-range-switch","z":"718fdd297bb4fec2","name":"Oscuridad","lat":"40.110848","lon":"-3.691797","startTime":"17:45","endTime":"02:00","startOffset":0,"endOffset":0,"x":130,"y":140,"wires":[["0574934a842d86b3"],[]]},{"id":"53b336bcc63a3047","type":"time-range-switch","z":"718fdd297bb4fec2","name":"Oscuridad","lat":"40.110848","lon":"-3.691797","startTime":"17:45","endTime":"02:00","startOffset":0,"endOffset":0,"x":130,"y":300,"wires":[["09707e72f60b88f5"],[]]},{"id":"930c45a77e4c143a","type":"comment","z":"718fdd297bb4fec2","name":"Rangos","info":"dawn > antes del amanecer\nnauticalDawn > antes del amanecer (náutico)\nsunrise > amanecer\nsunriseEnd fin del amanecer\nsolarNoon > mediodía solar\ngoldenHour > las horas de oro\ngoldenHourEnd > fin de las horas de oro\nsunsetStart > comienza la puesta de sol\nsunset > puesta del sol\ndusk > comienza la oscuridad\nnauticalDusk > comienza la oscuridad (náutica)\nnight > noche\nnightEnd > fin de la noche\nnadir > parte de la noche más oscura\n","x":1130,"y":240,"wires":[]},{"id":"630cc4eb44c5f355","type":"inject","z":"718fdd297bb4fec2","name":"Apagar manual","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":400,"wires":[["69a108d97cdd0581"]]},{"id":"881e57e35f648efd","type":"inject","z":"718fdd297bb4fec2","name":"Encender manual","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":40,"wires":[["0574934a842d86b3"]]},{"id":"42c7990c36c6784e","type":"debug","z":"718fdd297bb4fec2","name":"debug 16","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":920,"y":140,"wires":[]},{"id":"3a3319ec4e2f5e4d","type":"debug","z":"718fdd297bb4fec2","name":"debug 17","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":920,"y":220,"wires":[]},{"id":"7b29f8a330158aec","type":"debug","z":"718fdd297bb4fec2","name":"debug 18","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":920,"y":300,"wires":[]},{"id":"317076499a763abb","type":"api-call-service","z":"718fdd297bb4fec2","name":"Apagar luz","server":"2e0f828a.d95dbe","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.conmutador_entrada"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"","output_location_type":"none","x":550,"y":520,"wires":[["9152041f3117ad09"]]},{"id":"9152041f3117ad09","type":"debug","z":"718fdd297bb4fec2","name":"debug 30","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":920,"y":520,"wires":[]},{"id":"6b76e3731ca8ec7c","type":"delay","z":"718fdd297bb4fec2","name":"","pauseType":"delay","timeout":"60","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":760,"y":440,"wires":[["317076499a763abb"]]},{"id":"64294f8df7d5ff52","type":"change","z":"718fdd297bb4fec2","name":"Resetear delay","rules":[{"t":"set","p":"reset","pt":"msg","to":"now","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":500,"y":440,"wires":[["6b76e3731ca8ec7c"]]},{"id":"ac742b68274df028","type":"server-state-changed","z":"718fdd297bb4fec2","name":"Conmutador Entrada","server":"2e0f828a.d95dbe","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"switch.conmutador_entrada","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","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":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":130,"y":460,"wires":[["64294f8df7d5ff52"],[]]},{"id":"2e0f828a.d95dbe","type":"server","name":"Home Assistant","addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":false,"heartbeat":false,"heartbeatInterval":"","statusSeparator":"","enableGlobalContextStore":false}]

Hi, welcome - I've changed your category from "Creating nodes" to general since this question is not about creating custom nodes. Thanks.

Ok thanks and sorry, I'm new to this and I don't really know where it's going.

Add debug nodes and determine which is the first node that is not doing what it should.

Hello, thanks, I have done it, but nothing appears, all the flows have their corresponding debugs.
I also have a problem and that in the other flows, they do not respect the 60 seconds, they are on for 3 minutes

I don't use HA (few here do, we generally consider it better just to use NR) so don't know what your flow is doing. But if the problem is that nothing is coming from the HA nodes then you will probably be better asking on an HA forum.

I use it with HA because I don't know how to integrate Zigbee devices in any other way, because I also have Wi-Fi devices, but I don't use it from HA, I use it from a web terminal from its 1880 port

That is trivial. Use zigbee2mqtt.

1 Like

I have it installed to link the devices, but I would like to use node-red

In node red use the built in mqtt nodes to monitor and control the devices through mqtt.

ok, thank you very much

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