esphome / esphome/feature-requests

Ability to add historical data to Home Assistant using `async_add_external_statistics`

Open
#2,628 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
450
Forks
29
PR merge metrics
No merged PRs in 30d

Description

**Describe the problem you have/What new integration you would like**
Some ESPhome device do not have permanent connection to Home Assistant. Currently, when the connection to HA is lost, data from sensors is lost and will never be recorded in Home Assistant.

**Please describe your use case for this integration and alternatives you've tried:**
* Home Assistant upgrades
* Upgrade of network components (central router, Powerline Wi-Fi access point, etc.)
* Mobile devices (e.g. grass mower) temporarily moving out of network range

**Additional context**
An integration can add historical data into Home Assistant using `async_add_external_statistics`, as described [here](https://community.home-assistant.io/t/import-old-energy-readings-for-use-in-energy-dashboard/341406/9) for example.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the async_add_external_statistics API and the linked Home Assistant community discussion to understand how integrations currently import historical statistics. There are no files or tests named in the issue; done would mean defining and implementing a supported way for disconnected ESPHome sensors to add missed historical data to Home Assistant.

Written by the indexing model from the issue text.

Assessment

Domain
backend-api-design, data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.