Hi,
I´ve a sensor but it doesn´t get values:
Sensor is always unknown
mqtt:
[...]
-sensor:
[..]
- name : "Pool"
state_topic: "fhem/Thermo_Pool/temperature"
value_template: "{{ value.replace(',', '.') | round(1) }}"
device_class: temperature
unit_of_measurement: "°C"
unique_id: thermo_Pool
MQTT-> fhem/Thermo_Pool/temperature 18.1213
What ist wrong?
Greets
Spiro
May 23, 2025, 1:04pm
2
If you show the topic and payload from mqttexplorer someone maybe able to cast some light.
I mean you are showing value.replace(‘,’, ‘.’ but there is nothing with a , in that line at the bottom MQTT-> fhem/Thermo_Pool/temperature 18.1213.
mqtt:
sensor:
- name: " 1stFloorBedroomTemp"
device_class: "temperature"
state_topic: "thermostat_16115896/thermostat/properties"
value_template: "{{value_json.temperature }}"
unit_of_measurement: '°C'
I’m not sure about your layout of the sensor. That may be old style. Above is working for me.
francisp
(Francis)
May 23, 2025, 1:35pm
3
As first step in debugging, if you add | float(0), do you get a value ?
mqtt:
[...]
-sensor:
[..]
- name : "Pool"
state_topic: "fhem/Thermo_Pool/temperature"
value_template: "{{ value.replace(',', '.') | round(1) | float(0) }}"
device_class: temperature
unit_of_measurement: "°C"
unique_id: thermo_Pool