一键导入
homeassistant-energy-management
Guidance for using correct energy and power metrics in Home Assistant energy features
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Guidance for using correct energy and power metrics in Home Assistant energy features
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
How to create, update, and manage Changesets for release preparation in this repository
High-level Home Assistant integration best practices, quality scale cues, and testing/CI expectations for custom components
Patterns for Home Assistant config flows, discovery handlers, options flows, and reauth for custom components
Project-specific patterns for the Marstek integration (config flow, coordinator, scanner, entities, translations)
Practical test/CI playbook for Home Assistant custom components (config flow, coordinator, entities, diagnostics)
Repo-specific guidance for maintaining the Marstek integration (UDP Open API, polling, discovery/scanner) in a Home Assistant-friendly way
| name | homeassistant-energy-management |
| description | Guidance for using correct energy and power metrics in Home Assistant energy features |
This skill helps you choose and expose the correct metrics for Home Assistant energy features (Energy Dashboard, grid, and individual devices) to avoid incorrect graphs or totals.
total_increasing and device_class energy for kWh totals.measurement and device_class power for W values.| Concept | Correct Metric | Unit | Notes |
|---|---|---|---|
| Grid import | Total energy imported | kWh | Separate from export; total_increasing |
| Grid export | Total energy exported | kWh | Separate from import; total_increasing |
| Solar/production | Total energy produced | kWh | Must be total_increasing |
| Home consumption | Total energy consumed | kWh | Prefer derived if not provided |
| Instant grid power | Power at grid | W | Positive/negative must be consistent |
device_class=energy, state_class=total_increasing, native_unit_of_measurement=kWh.device_class=power, state_class=measurement, native_unit_of_measurement=W.