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