HADailySensor
Sensor for Home Assistant that gets reset at midnight
Install / Use
/learn @jeroenterheerdt/HADailySensorREADME
HADailySensor

Daily Sensor is a Home Assistant custom component that accumulates readings from a chosen sensor throughout the day and resets at midnight. You can select how values are aggregated: minimum, maximum, sum, average (mean), median, standard deviation, or variation. It's a simple way to produce clear daily summaries from any numeric sensor.
⚠️ Critical Fix Available (v2026.2.6)
If you're experiencing a 500 error when editing Daily Sensor configuration, this fork contains critical bug fixes that are pending merge to the upstream repository.
Issue
The upstream HACS version has a breaking bug that causes a 500 Internal Server Error when attempting to edit existing Daily Sensor configurations via the UI.
Solution
Until PR #105 is merged, install this maintained fork:
Via HACS (Custom Repository):
- HACS → Integrations → ⋮ (top right) → Custom repositories
- Add repository:
https://github.com/elyobelyob/HADailySensor - Category: Integration
- Click "Add"
- Search for "Daily Sensor" and install v2026.2.6 or later
- Restart Home Assistant
What's Fixed:
- ✅ 500 error when editing sensor configuration
- ✅ AttributeError on config_entry property
- ✅ ValueError when source sensor is unavailable
- ✅ Options flow type handling improvements
- ✅ Code quality and formatting improvements
Configuration
Install the custom component (preferably using HACS) and then use the Configuration --> Integrations pane to search for 'Daily Sensor'. You will need to specify the following:
- Name - Unique name for this daily sensor instance
- Input Sensor - The source sensor to aggregate data from
- Operation - Aggregation method:
min,max,sum,mean,median,stdev, orvariance - Unit of Measurement - Display unit for the sensor value
- Interval - Update frequency in seconds (default: 1800)
- Auto Reset - Automatically reset at midnight (default: enabled)
- Preserve on Unavailable - Keep last value when source sensor becomes unavailable (default: disabled)
- When enabled, the daily sensor retains its current value if the input sensor becomes unavailable (e.g., during Home Assistant restart)
- When disabled (default), the daily sensor becomes unavailable when the input sensor is unavailable
- Useful for maintaining accurate daily statistics across HA restarts
All sensors will be reset at 00:00 local time (unless auto-reset is disabled) and can be reset manually by calling the daily.reset service for each instance.
Use case
This component is most frequently used to create a minimum and maximum daily temperature sensor based on a temperature sensor that is provided by a weather station, but can be used for many different things.


