With the new version and multiple adguard support, I want to turn them all on / off at the same time

I have two adguard’s, one is an ‘internal’ HA addon, the other runs on a seperate RPi.

I made this very simple flow to turn off the seperate Adguard filtering on / off together with the internal one by doing this:

image

[{"id":"4d62f651.d2fb4","type":"server-state-changed","z":"9124e9e6.a70a9","name":"Adguard filtering","server":"6e6a992d.094ca8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"switch.adguard_protection","entityidfiltertype":"exact","outputinitially":false,"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,"x":100,"y":1440,"wires":[["b43d8b6.a6048f8"]]},{"id":"b43d8b6.a6048f8","type":"api-call-service","z":"9124e9e6.a70a9","name":"Switch adguard filtering","server":"6e6a992d.094ca8","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_{{payload}}","entityId":"switch.adguard_protection_2","data":"","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":410,"y":1440,"wires":[[]]},{"id":"523a870.b31daf8","type":"comment","z":"9124e9e6.a70a9","name":"Switches second adguard depending on first adguard","info":"","x":220,"y":1400,"wires":[]},{"id":"6e6a992d.094ca8","type":"server","name":"KF Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

So the simple idea is that the first node returns a payload of on or off, and then the command is sent out to the other with a template

turn_{{payload}}

This works nicely, and it’s only two nodes :slight_smile:

1 Like