Hello everyone,
after trying for quite some time, I am ready to give up.
I am trying to set up my bed sensor. The sensor is meant to send its data via MQTT.
I have created the following two sensors but they keep showing up as “unavailable”:
mqtt:
sensor:
- name: "Bed"
state_topic: "home/bedroom/bed"
unit_of_measurement: "kg"
availability_topic: "home/bedroom/bed/available"
availability_mode: latest
value_template: '{{ value_json.bed | float }}'
icon: "mdi:bed"
qos: 0
state_class: measurement
- name: "Bed Raw"
state_topic: "home/bedroom/bed/raw"
unit_of_measurement: "raw"
availability_topic: "home/bedroom/bed/available"
The upper one looks more complicated but is only the result of me trying out different things.
I can get a value when I listen to the topic home/bedroom/bed
. I can also see the sensor reporting when I use MQTT explorer.
But I do not know how to get the data into my sensor. The documentation does not help me as everything that is shown there, I have tried, in my opinion. Can anyone point to my mistake?
Thanks for the help