Per-topic gate switch passing disgnostic string but not key/value objects

This flow utilizes a per-topic gate switch (the gate locks the ability to adjust water valves in a greenhouse). The gate will not pass a key/value object (holding moisture data to control the valve), but it will pass an diagnostic injection string. Any assistance in getting the switch to pass the key/value object is greatly appreciated.
Thanks, Ron

[{"id":"1fd989417e0f445c","type":"tab","label":"switch test flow","disabled":false,"info":"","env":[]},{"id":"8f015ec3e205649c","type":"server-state-changed","z":"1fd989417e0f445c","name":"","server":"6b4e489a.41f468","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.zone2_low_moisture_target","entityidfiltertype":"exact","outputinitially":true,"state_type":"num","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":270,"y":240,"wires":[["2be6f92c3749c69c"]]},{"id":"c19a8e0b8a3e197d","type":"server-state-changed","z":"1fd989417e0f445c","name":"","server":"6b4e489a.41f468","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.zone2_moisture","entityidfiltertype":"exact","outputinitially":true,"state_type":"num","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":310,"y":360,"wires":[["2be6f92c3749c69c"]]},{"id":"2be6f92c3749c69c","type":"join","z":"1fd989417e0f445c","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"3","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":590,"y":300,"wires":[["9c220e05cf5645e8","bc457e29637bcaf9"]]},{"id":"ba7a32ba75037099","type":"server-state-changed","z":"1fd989417e0f445c","name":"","server":"6b4e489a.41f468","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.zone2_high_moisture_target","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":270,"y":300,"wires":[["2be6f92c3749c69c"]]},{"id":"46b4ba1fb8b9cc27","type":"change","z":"1fd989417e0f445c","name":"","rules":[{"t":"set","p":"topicGate","pt":"flow","to":"$merge([$flowContext('topicGate'), {interlock: payload}])","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":430,"y":120,"wires":[["91bcf4278714b5f2"]]},{"id":"dc281bedda685708","type":"inject","z":"1fd989417e0f445c","name":"","props":[{"p":"payload"},{"p":"interlock","v":"interlock","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"1","topic":"","payload":"test1","payloadType":"str","x":330,"y":460,"wires":[["bc457e29637bcaf9"]]},{"id":"91bcf4278714b5f2","type":"debug","z":"1fd989417e0f445c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":630,"y":120,"wires":[]},{"id":"9c220e05cf5645e8","type":"debug","z":"1fd989417e0f445c","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":770,"y":300,"wires":[]},{"id":"bc457e29637bcaf9","type":"switch","z":"1fd989417e0f445c","name":"topicGate","property":"$flowContext('topicGate') ~> $lookup(interlock)","propertyType":"jsonata","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":540,"y":460,"wires":[["c7863f228e44ee2b"]]},{"id":"c7863f228e44ee2b","type":"debug","z":"1fd989417e0f445c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":710,"y":460,"wires":[]},{"id":"a5afc615acab7a7d","type":"server-state-changed","z":"1fd989417e0f445c","name":"","server":"6b4e489a.41f468","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"switch.interlock","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"},{"property":"interlock","propertyType":"msg","value":"interlock","valueType":"str"}],"x":170,"y":120,"wires":[["46b4ba1fb8b9cc27"]]},{"id":"6b4e489a.41f468","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}]

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