Logging the heating time

Hello all,
I am still a beginner and layman in the piece of software.

However, I have already integrated many of my devices and can display, control and log them. Thanks to all for the awesome system!

Is there in the Home Assistant the possibility of a Temparatur Senor to measure the time of day, how long the temperature has risen sharply?

Look at the picture, then you understand what I mean and also why I like to measure this :wink:

Thanks
Ulli

Hi !
Maybe using the - platform: statistics ?
statistics
And then making a calculation between max and min ?
But don’t know how to deal for the max and min identification with several variations

I don’t know how to do this in HASS, but could you use the differential / rate of rise / dTemp/dtime ?

You can use the Trend integration to create a binary sensor that returns ‘on’ when the temperature is changing above your specified degrees/time. Then monitor that sensor with a History stats sensor. The History Stats integration will give you the number of hours/day the temperature is rising.

binary_sensor:
 - platform: trend
   sensors:
     indoor_temp_rising:
       entity_id: sensor.indoor_temperature
       sample_duration: 3600
       max_samples: 120
       min_gradient: 0.0011
       device_class: heat

sensor:
 - platform: history_stats
   name: Heat Active today
   entity_id: binary_sensor.indoor_temp_rising
   state: "on"
   type: time
   start: "{{ today_at() }}"
   end: "{{ now() }}"

Make sure to read the documentation carefully, especially with regards to the Trend sensor. You will need to set the sample variables based on your specific case and the devices you are using.

I used the platform: history_stats sensor in order to calculate the whole time my heater is on.
Works well !

Does your climate entity expose an hvac_action attribute? If so, you can use that to create a Template sensor instead of the Trend sensor.

template:
  - binary_sensor:
    - name: "Heating On"
      state: "{{ is_state_attr('climate.YOUR_ENTITY', 'hvac_action', 'heating') }}"

sensor:
  - platform: history_stats
    name: Heat Active today
    entity_id: binary_sensor.heating_on
    state: True
    type: time
    start: "{{ today_at() }}"
    end: "{{ now() }}"
1 Like

Thanks for your answer, even if i delete my post a couple of minutes after my posting because i found the first solution with Templates

sensor:

  • platform: template
    sensors:
    og_wc_temp:
    friendly_name: “OG WC Temp”
    unit_of_measurement: ‘degrees’
    value_template: “{{ state_attr(‘climate.og_wc’, ‘current_temperature’) }}”

The temperature is increased by an electronic fan heater. The temperature measured by a thermostat on the heater.