Hi all
I have been playing around with HA for a few weeks and getting to grips with it.
I’m trying to automate my electric heating to switch on based excess Solar power. I have been reading a few options and I’m just trying create a statistic to measure the excess solar over a period of time to avoid the constant switching on and off the heating.
The statistic below does not seem to be available for me to select anywhere. I have it in my sensor.yamal and have sensor: !include sensor.yaml in my config file.
I have read up on the stats page on HA but can not figure out why I can not see the value. Excess_Solar is working fine
Any suggestions? TIA
# Excess Power from Solar
- platform: template
sensors:
excess_solar:
friendly_name: Excess_Solar
unit_of_measurement: "W"
value_template: '{{ (states("sensor.pv_power") | float - states("sensor.load_power") | float) }}'
# Average excess power over 5 mins
- platform: statistics
name: Excess_Power_Mean
entity_id: sensor.Excess_Solar
state_characteristic: mean
max_age:
minutes: 5
``````````````````````````````````````````````````````````