Utilsation switch

Bonjour.
je souhait utilisee la fonction "Switch" pour mettre en route des relais.

hors j'active 0 bien les relais mais je voudrais que quand la variable ne plus la bonne revenir a le etat 1

comment faire ?

Bonjour @yan!
I apologize, my French is terrible. How is your English?

To clarify, do you want:

  1. Specific msg.payload value triggers a relay to be activated
  2. Same msg.payload value keeps relay activated
  3. Different msg.payload value deactivates relay

Or do you want:

  1. Specific msg.payload value triggers a relay to be activated
  2. Variable monitored
    a. If variable is same as original msg.payload value relay remains activated
    b. If variable is different from original msg.payload relay is deactivated