Hello,
i’m new to home-assistant, so i hope it’s not a stupid question.
My Home-Assistant (2022.11.5) is running in a docker container on a ubuntu server.
I connected it to MQTT and it discovered all my Tasmota devices with no big issues.
I got a raspberry pi with a 433mhz sender, which want to connect as switches via MQTT.
I created a mqtt.yaml file:
switch:
- name: "Lichterkette"
unique_id: "switch.flur.lichterkette"
state_topic: "hab/443/get/103"
command_topic: "hab/433/set/103"
retain: true
the switch is shown on the Overview. And i can actually turn on and off the light. But it is shown as a switch with two buttons (so you can’t see the status, as for the Tasmota switches). I can turn it on and off, but the status is not shown. But i can see that the status was send from the Pi to “hab/443/get/103”. Message is always “ON” or “OFF”.
So i created a Sensor:
sensor:
- name: "Lichterkette"
unique_id: "status.flur.lichterkette"
state_topic: "hab/443/get/103"
But the status is always shown as “unknown”. Even when i change the state_topic to “hab/443/set/103”. I checked the MQTT-traffic and can’t see any issue in the communication.
There are no issues in the logfile.
I tried to change the topic-name, restart the Mosquitto-Server, resetting the complete Home-Assistant config, deleting all retained messages in MQTT, optimistic mode, retain true/false, setting payload_on/payload_off and state_on/state_off, but nothing has changed.
All help i could find online, was about a different (old?) format in YAML. Even this does not work.
Does anyone got an idea?