Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 103318

Need help with history_stats after update

$
0
0

Prior to 2022.5 I had an automation that told me how long the heating had run for that day.

alias: Heating Runtime Notification
description: ''
trigger:
  - platform: time
    at: '23:59'
condition:
  - condition: numeric_state
    entity_id: sensor.heating_run_time_today
    above: '0'
action:
  - service: notify.tg_house_group
    data:
      title: Heating Runtime Notification
      message: >-
        Heating runtime today: {{
        state_attr('sensor.heating_run_time_today','value') }}
mode: single

This doesn’t work after the update - because the value attribute has been removed.
Does anyone have any Jinja code I can use to convert the state of this sensor back to a hh:mm format ?

 - platform: history_stats
   name: Heating Run Time Today
   entity_id: switch.house_boiler
   state: "on"
   type: time
   start: "{{ now().replace(hour=0,minute=0,second=0) }}"
   end: "{{ now() }}"

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 103318

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>