I need some help here because I looked at this now trillion times but I cant get there error.
I want to control a switch and a sensor via MQTT.
This is my mqtt related part in the configuration
mqtt:
broker: mqtt.domain.lcl
sensor:
- platform: yr
- platform: mqtt
name: "Stimmung"
state_topic: "house/hagen/mood"
switch:
- platform: mqtt
name: 'dash'
command_topic: 'house/switch/dash/set'
state_topic: 'house/switch/dash/status'
payload_on: "1"
payload_off: "0"
retain: true
optimistic: false
Both items show up on the HA Dashboard. The sensor is working but for the switch HA does not recognize the mqtt message
mosquitto_pub -h 127.0.0.1 -t "house/hagen/mood" -m "bad"
EBUG:homeassistant.components.mqtt:Received message on house/hagen/mood: bad
mosquitto_pub -h 127.0.0.1 -t "house/switch/dash/set" -m "1"
no result in HA Log or on the dashboard.
Both messages show up on the mqtt bus
Any ideas what I do wrong?