百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
H

HADailySensor

> 编程语言
开源

用于 Home Assistant 的传感器,在午夜时分进行重置

100 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

用于 Home Assistant 的传感器,在午夜时分进行重置

Support the author on Patreon

Buy me a coffee

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):

  1. HACS → Integrations → ⋮ (top right) → Custom repositories
  2. Add repository: https://github.com/elyobelyob/HADailySensor
  3. Category: Integration
  4. Click "Add"
  5. Search for "Daily Sensor" and install v2026.2.6 or later
  6. 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, or variance
  • 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.

Issues· 10 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Pythonaggregationaveragehome-assistanthome-automation

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言