#"Unknown error occurred" creating template

1 messages · Page 1 of 1 (latest)

quasi narwhal
#

Hi all,

I'm attempting "merge" two sensors so I can keep historic data in the Energy Panel after installing solar. I have no idea what I'm doing when it comes to templates, but I'm guessing I'm running into something HA doesn't have an error for since it's "Unknown". The template is in the attached photo.

#

Here is the data and settings for the two sensors

lime rock
#

Your template is comparing timezone offset-naive and offset-aware datetimes. Add | as_local to the fixed datetime string.

quasi narwhal
lime rock
#

That's not possible with a template sensor... there is no template access to historical data.

quasi narwhal
#

I think I'll just throw a $100 bounty for merging historical data on the GitHub feature request discussions next paycheck

#

Since I know I'm not the only one who has this issue. The "workaround" is naming a new sensor the same as an old sensor but I'd rather not

#

Especially since I want to merge historical data at a specific point. Not from "now onwards"

tough kiln
#

Spook has an option to import statistics https://spook.boo/recorder
So use recorder.get_statistics on the old entity, then import it in the template entity using the Spook action

quasi narwhal