用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Tzeusy/butlers --skill weekly-energy-digest命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | weekly-energy-digest |
| description | Generate a weekly home energy digest with trends, top consumers, and recommendations. |
Generate and send a weekly energy efficiency digest every Sunday at 9am. Analyze device energy
consumption from the past 7 days, identify top consumers, compare against stored baselines,
and compose a structured summary with recommendations. Deliver via
notify(channel="telegram", intent="send").
Use this skill when:
weekly-energy-digest scheduled task fires (cron: 0 9 * * 0, Sundays at 09:00)ha_list_entities(domain="sensor") to get all sensor entities.energy, power, kwh, consumption, watt (case-insensitive).statistic_ids for the top-level energy meter and per-device sensors
(e.g., ["sensor.energy_total_kwh", "sensor.hvac_energy", "sensor.water_heater_energy", "sensor.kitchen_energy"]).Call ha_get_statistics() to get the past 7 days of energy data:
ha_get_statistics(
statistic_ids=<energy_sensor_ids>,
start=<7 days ago, ISO 8601, midnight>,
end=<now, ISO 8601>,
period="day"
)
This returns daily aggregated statistics per sensor for the device breakdown.
For aggregate consumption, request an hour-aligned 168-hour window:
ha_get_statistics(
statistic_ids=<per_device_sensor_ids>,
start=<168 hours before the latest UTC hour boundary>,
end=<latest UTC hour boundary>,
period="hour"
)
Sum only finite numeric per-hour change values. Home Assistant derives change from
cumulative-energy statistics; do not integrate mean power values. Treat a series with any
missing, non-numeric, or non-finite change as unsupported. An explicit change=0 is valid
zero consumption.
If every sensor is unsupported, notify the owner that cumulative-energy statistics are unavailable and recommend configuring a Home Assistant energy helper for power-only sensors. Do not compute or store a baseline.
Call memory_recall(subject="energy", predicate="energy_baseline") to retrieve stored baseline
consumption patterns.
Also search for device-specific baselines:
memory_recall(subject="hvac", predicate="energy_baseline")memory_recall(subject="water-heater", predicate="energy_baseline")From the weekly statistics:
Based on top consumers and anomalies, compose 2-3 actionable recommendations:
Limit to 2-3 recommendations. Prioritize by impact.
After analysis, persist key findings:
memory_store_fact(
subject="energy",
predicate="energy_baseline",
content="Weekly consumption: <X> kWh total. Top consumers: HVAC (<Y>%), water heater (<Z>%)",
permanence="standard",
importance=6.0,
tags=["energy", "weekly-digest", "baseline"]
)
If an anomaly was detected:
memory_store_fact(
subject=<device_name>,
predicate="energy_spike",
content="<device> consumed <X> kWh this week — <Y>% above baseline",
permanence="volatile",
importance=7.5,
tags=["energy", "anomaly", <device_name>]
)
Format the digest as a structured message:
Weekly Energy Digest — [Date range, e.g. "Feb 17-23"]
Total: [X] kWh ([+/-Y]% vs. typical)
Peak day: [Weekday] with [Z] kWh
Top Consumers:
1. HVAC — [X] kWh ([Y]%)
2. Water Heater — [X] kWh ([Y]%)
3. Kitchen Appliances — [X] kWh ([Y]%)
4. Washer/Dryer — [X] kWh ([Y]%)
5. Lighting — [X] kWh ([Y]%)
[Anomaly alert if present:]
Water heater ran 6h longer than usual on Tuesday — possible tank issue.
Recommendations:
• [Recommendation 1]
• [Recommendation 2]
[• Recommendation 3 if applicable]
Savings vs. baseline: [X] kWh saved / [Y]% below average (or: usage is on target)
Send via:
notify(
channel="telegram",
intent="send",
subject="Weekly Energy Digest — [Date range]",
message=<formatted_digest>,
)
Use intent="send" — this is a scheduled proactive delivery, not a reply.
ha_list_entities(domain="sensor") called to discover energy sensorsha_get_statistics() called with an hour-aligned 168-hour window and period="hour" to
retrieve finite per-hour change valuesmemory_recall() called to retrieve stored energy baselinesmemory_store_fact() called to update energy baseline and any anomaly factsnotify(channel="telegram", intent="send")notify(channel="telegram", intent="send"): "Could not find energy sensors in Home Assistant. Weekly digest
unavailable. Check that energy monitoring is configured in HA."change.