klausj1 / homeassistant-statistics

This HA integration allows to import long term statistics from a file like csv or tsv
MIT License
52 stars 3 forks source link

Is there any way to enter data for the 'statistics_short_term` table? #52

Closed puterboy closed 1 week ago

puterboy commented 3 months ago

Checklist

Is your feature request related to a problem? Please describe.

I would like to import short term statistics (i.e., once every 5 minutes) as well as the hourly statistics that your integration currently covers.

Describe the solution you'd like

Similar code with ability to upload a file with short term statistics data to be entered into the statistics_short_term table. (Ideally, also a REST API so json encoded short term statistics could be added via an API rather than uploading a file)

Describe alternatives you've considered

Manually adding stuff to the SQLite database or purging the recorder.

Additional context

-

klausj1 commented 3 months ago

I am not aware of an HA-interface I could use for this. I would need a method similar to async_import_statistics / async_add_external_statistics which also works for short term statistics. If you find that out, I could give it a try.

klausj1 commented 1 week ago

No feedback, close.