Hello,
I am trying to set the availability_topic
of many MQTT switches to the same value, so I can update that single topic with a Last Will Testament and get all MQTT switches disabled at the same time.
If I do this, only one of the switches is actually reading from the topic, the other just keep disabled forever, independently of the topic value.
Is what I want to do even possible?
If you need me to post any other information let me know.
Related configuration.yaml
lines:
switch:
- platform: mqtt
unique_id: huerto
name: "Huerto"
state_topic: "/f0iehfw8dc2/SECTORS/huerto/SENSOR"
command_topic: "/f0iehfw8dc2/SECTORS/huerto/ACTUATOR"
availability_topic: "/f0iehfw8dc2/LWT"
payload_not_available: "0"
payload_available: "1"
payload_on: "1"
payload_off: "0"
state_on: "1"
state_off: "0"
optimistic: false
qos: 0
switch:
- platform: mqtt
unique_id: aspersores
name: "Aspersores"
state_topic: "/f0iehfw8dc2/SECTORS/aspersores/SENSOR"
command_topic: "/f0iehfw8dc2/SECTORS/aspersores/ACTUATOR"
availability_topic: "/f0iehfw8dc2/LWT"
payload_not_available: "0"
payload_available: "1"
payload_on: "1"
payload_off: "0"
state_on: "1"
state_off: "0"
optimistic: false
qos: 0