Morning Stefan.
Will give that a go later today.
How I report the hours is a working progress, but may be enough for you to start with. I have a wiser system that has the attributes for when the TRV’s are heating and not heating.
To count the hours, I created several toggels using the helper, i.e Lounger Radiator. Then I used a simple automation to see when the the trv are heating and flip that toggle switch on
alias: Lounge radiator on
description: ""
trigger:
- platform: device
device_id: 4dd8d15d3a96f59cf25eafc396ffccce
domain: wiser
entity_id: climate.wiser_lounge
type: started_heating
condition: []
action:
- service: input_boolean.turn_on
data: {}
enabled: true
target:
entity_id:
- input_boolean.lounge_radiator
mode: single
Another automation to flip it off when not heating. This is the bit I don’t like, I know there is another way I can do this in configuration template, just not managed to get it working properly by exposing the right attribute from the climate.wiser_lounge entity yet.
Anyway, I then counted how long that toggle was on, using a custom sensor.yaml file.
- platform: history_stats
name: Lounge radiator heating
entity_id: input_boolean.lounge_radiator
state: "on"
type: time
start: "{{ now().replace(hour=0, minute=0, second=0) }}"
end: "{{ now() }}"
The sensor.yaml file is included in the configuration.yaml
# Loads default set of integrations. Do not remove.
default_config:
# Load frontend themes from the themes folder
frontend:
themes: !include_dir_merge_named themes
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
sensor: !include sensors.yaml
Last step, reference the “Lounge radiator heating” made in the sensor.yaml into apex series
I’m not sure how familiar you are with yaml, personally I have never touched this and a complete beginner, however, I include all the steps here in case somebody like me learns from this
I have sperate counting for the actual boiler on time, as you well know the amount of time the radiators are on, does not actually reflect the time the boiler is fired up, I’m looking for a smarter way to incorporate that statistic with the radiator on into the graphs
- platform: history_stats
name: Heating on Today
entity_id: sensor.wiser_heating
state: "On"
type: time
start: "{{ now().replace(hour=0, minute=0, second=0) }}"
end: "{{ now() }}"