I would like to have the temperature sensor of my floor heating in a graph.
But since the temperature is only displayed in the state of the heating, I have created the following sensor:
In the new sensor, the current temperature is displayed correctly. But when I look at the sensor in the history, I only see a bar with the temperatures.
Add a unit_of_measurement: to your sensor config. Only sensors with units get graphed like that.
Also that is the wrong sensor platform.
Add this to your configuration.yaml file instead:
template:
sensor:
- name: Heizung Esszimmer Temperatursensor:
state: "{{ state_attr('climate.smart_thermostat_210940168395749','current_temperature')}}"
unit_of_measurement: "C" # or F
device_class: temperature
state_class: measurement # only include this line if you want long term statistics