I’m new to using helpers in Home Assistant, so I’m probably doing something wrong here. I’m trying to have a helper store the total lifetime solar production into a helper.
The traces show that it finishes the math of adding both numbers properly as the value, so I know the value section is correct. The automation completes with no error, but it never updates the helper value.
alias: Lifetime Solar Production
description: ''
trigger:
- platform: time
at: '23:00:00'
condition: []
action:
- event: ''
event_data:
action: input_number.set_value
metadata: {}
target:
entity_id: 'input_number.lifetime_solar_energy'
data:
value: "{{ states('input_number.lifetime_solar_energy') | float(0) + states('sensor.envoy_energy_production_today') | float(0) }}"
mode: single
I know the single quotes on the entity_id line are not standard and I added those in my last iteration, it also did not work without them.
Yes, prior to those edits, the automation would fire and display the completed math in the value output in traces, just failing to update the input number helper. After the edits, the automation no longer loads and shows up in red on the automations list.
It would be a lot simpler to use a Utility Meter helper with no reset cycle. It will just count up your solar energy forever. It does not matter if your daily sensor resets.
I was hoping someone might have a simpler solution, I didn’t notice that option when creating the helper.
I do still want to fix the issue here since it seems it might be wider than just this helper.
That sounds great. I searched around and found that the long term statistics table saves states every hour and lasts indefinitely, but no reference as to where that is kept or how to reference it.
I have statistics graphs showing the data that I want to keep and have worked for the past 3 months; how do I know if they are pulling from the short term statistics or long term statistics tables? I’d like to revert the change to my recorder length, but I don’t want to suddenly lose data if I’m referencing short term statistics.
chart_type: line
period: day
type: statistics-graph
entities:
- [list of device serial numbers]
stat_types:
- mean
hide_legend: true
days_to_show: 365
title: Annual Panel Performance