Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 106639

MQTT Statestream Switch setup advice needed

$
0
0

I use MQTT statestream communication to exchange states between two Home Assistant instances. This worked fine with sensors. But I failded with a switch, initially provided by AdGuard. I’m able to read the switch state, but fail to set the switch to a a new state. My initial guesses like “set”, “ON”, etc. dont work. My code sniplets:

mqtt_statestream:
  base_topic: rp42
  include:
    entities:
      - switch.adguard_protection

(Switch)
  - platform: mqtt 
    name: "adguard_protection_137" 
    state_topic: "rp42/switch/adguard_protection/state" 
    command_topic: "rp42/switch/adguard_protection/set" 
    payload_on: "on" 
    payload_off: "off" 
    state_on: "on"
    state_off: "off"
    optimistic: false
    retain: true

mqtt

Suggesions to find a solution, in particular the right command_topic string are appreciated.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 106639

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>