Answer the question
In order to leave comments, you need to log in
Should HASS MQTT-switch switch if state-topic is changed?
The second day I can not deal with mqtt-switch. Set up switch like this:
- platform: mqtt
command_topic: "koridor/light/main/set"
state_topic: "koridor/light/main/state"
name: light_koridor_main
payload_on: 1
payload_off: 0
state_on: 1
state_off: 0
qos: 0
optimistic: false
Answer the question
In order to leave comments, you need to log in
I'm afraid it's not relevant anymore, but I'll answer the question anyway.
The behavior is completely normal.
Device status should only be viewed in the status topic. In a management topic, you should not expect any changes when the state changes, it serves only for management and only for it. In other words, the desired state is sent to the topic for management, the actual state is taken from the state topic.
If you track changes in the koridor/light/main/set topic, then this is incorrect, you need to rely on the koridor/light/main/state topic.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question