用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Tzeusy/butlers --skill energy命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | energy |
| description | Analyze home energy consumption, detect anomalies, and recommend optimizations. |
Track and analyze home energy consumption to help user understand where energy goes, identify inefficiencies, and make optimization decisions. Generate weekly energy digests with trends, device rankings, and actionable recommendations. Alert on anomalies (unexpected spikes, always-on devices).
Use this skill when:
To answer any energy question:
Determine the time period from user's request or use defaults:
Call energy_get_consumption() with:
period: Time period (today, this_week, this_month, custom date range)granularity: Optional — hourly, daily, or summary (default: summary)Call energy_get_devices_by_usage() to rank top consumers:
period: Same as abovelimit: 5-10 devices (show top consumers)Call energy_get_peak_times() to identify demand patterns:
period: Same as aboveCompare current consumption to historical patterns:
Call memory_recall() to retrieve stored energy baselines:
energy_baseline facts about typical consumption by device or timeCalculate deviations:
Identify anomalies:
After analyzing consumption:
Call memory_store_fact() to persist key findings:
subject: Device name or "energy"predicate: energy_baseline, energy_spike, or energy_patterncontent: Concise description of pattern or anomalypermanence: standard (patterns may shift seasonally)importance: 5-7 (depends on significance)tags: Device names, time periods, severity (e.g., ["hvac", "baseline", "winter"])Example facts:
When user asks about consumption (e.g., "What's my energy usage today?"):
notify() (answer mode):
Run on schedule (e.g., Sunday 9am):
Retrieve last 7 days of data via energy_get_consumption(period="this_week")
Retrieve peak times and device rankings
Analyze trends:
Calculate efficiency metrics:
energy_get_efficiency_metrics() for year-over-year or month-over-month comparisonGenerate recommendations:
energy_suggest_optimization() for top energy consumersCompose digest with sections:
Send via notify() (proactive intent):
When anomalous consumption is detected:
Identify the anomaly:
Alert the user:
notify()Store anomaly as volatile memory fact:
subject: Device namepredicate: energy_spike or device_issuepermanence: volatileimportance: 7-8 (anomalies need attention)tags: Device, severity, dateSuggest investigation:
When user asks for ways to reduce consumption:
Call energy_suggest_optimization() for:
Rank suggestions by impact and effort:
Compose response with:
Get user consent before implementing changes
One metric per user message:
Never just say "18 kWh". Always provide context:
Give 2-3 suggestions max, ranked by impact. Offer to dive deeper if user wants.
Remember comfort preferences when suggesting optimizations:
This example uses the native Home Assistant tools. It illustrates a realistic 3-turn conversation where a user investigates high HVAC usage and adjusts settings.
Turn 1 — User: "Show me my top energy consumers"
Actions:
ha_list_entities(domain="sensor") — find energy monitoring sensors (look for energy, kwh, power in entity IDs)ha_get_statistics(statistic_ids=["sensor.hvac_energy", "sensor.water_heater_energy", "sensor.kitchen_energy"], start="<month start ISO>", end="<now ISO>", period="month")notify(channel="telegram", message="This month's top consumers:\n1. HVAC — 145 kWh (42%)\n2. Water Heater — 86 kWh (25%)\n3. Kitchen appliances — 52 kWh (15%)\n4. Lighting — 28 kWh (8%)\n5. Other — 34 kWh (10%)\nTotal: 345 kWh", intent="reply", request_context=...)Turn 2 — User: "The HVAC seems high. Can you suggest ways to reduce it?"
Actions:
ha_get_history(entity_ids=["climate.main_hvac"], start="<7 days ago ISO>") — review recent HVAC state changes (setpoints, mode changes)ha_get_statistics(statistic_ids=["sensor.hvac_energy"], start="<30 days ago ISO>", end="<now ISO>", period="day") — day-by-day usage trendmemory_recall(subject="hvac", predicate="energy_baseline") — check stored baselinenotify(channel="telegram", message="HVAC analysis:\n• Running 14h/day on average (high for this time of year)\n• Peak usage: 7-9am and 6-9pm\n• 18% above your usual baseline\n\nSuggestions:\n1. Lower nighttime setpoint by 2°F (saves ~10% on heating)\n2. Pre-cool/pre-heat 30min before peak demand, then let it coast\n3. Check/replace air filter — dirty filters increase runtime\n\nWant me to adjust the night setpoint?", intent="reply", request_context=...)Turn 3 — User: "Set bedroom temperature 2 degrees lower at night"
Actions:
ha_get_entity_state(entity_id="climate.bedroom") — get current setpoint (e.g., 70°F)ha_call_service(domain="climate", service="set_temperature", target={"entity_id": "climate.bedroom"}, data={"temperature": 68})memory_store_fact(subject="bedroom", predicate="comfort_preference", content="user prefers bedroom 2°F cooler at night; setpoint reduced to 68°F to save HVAC energy", permanence="stable", importance=7.0, tags=["temperature", "comfort", "bedroom", "night", "energy"])notify(channel="telegram", message="Bedroom night temperature set to 68°F (was 70°F). This should trim HVAC runtime and reduce your monthly usage.", intent="reply", request_context=...)energy_get_consumption() was called to retrieve usage dataenergy_get_devices_by_usage() and/or energy_get_peak_times() were calledmemory_store_fact() was called to persist baseline, pattern, or anomalynotify() with: