Grid-Aware Energy Load Shifter
简介
Grid-Aware Energy Load Shifter
原始描述
Grid-aware energy load shifter for Home Assistant. Reads real-time electricity prices (TOU, time-of-use, dynamic pricing), solar production forecasts, batter...
通过你的 Agent 添加
安装目录:grid-aware-energy-load-shifter/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: grid-aware-energy-load-shifter description: > Grid-aware energy load shifter for Home Assistant. Reads real-time electricity prices (TOU, time-of-use, dynamic pricing), solar production forecasts, battery state of charge, and consumption data from Home Assistant. Schedules deferrable household loads (EV charging, HVAC pre-conditioning, pool pump, dishwasher, laundry, water heater) to cheapest rate windows. Calculates cost savings, optimizes solar self-consumption, and supports virtual power plant (VPP) demand response signals. Works with Nordpool, ENTSO-e, Tibber, Octopus Energy, Amber Electric, and any utility rate plan worldwide. Built for distributed energy resource (DER) optimization and residential demand-side management. metadata: openclaw: emoji: "⚡" tags: - energy - home-assistant - load-shifting - time-of-use - solar - battery-storage - demand-response - vpp - ev-charging - smart-home - DER - grid-optimization
Grid-Aware Energy Load Shifter
Shift heavy residential loads to the cheapest electricity hours using Home Assistant energy data.
Quick Start
# Find all energy-related entities in HA
python3 {baseDir}/scripts/ha_bridge.py discover
# Get a full energy dashboard snapshot (prices, solar, consumption, batteries)
python3 {baseDir}/scripts/ha_bridge.py energy-summary
# Turn on the EV charger
python3 {baseDir}/scripts/ha_bridge.py call-service switch/turn_on --entity-id switch.ev_charger
Connection
Two paths to reach Home Assistant:
- MCP (preferred): If the HA MCP server is configured, use
mcporter call homeassistant.<tool>directly. - REST API: Use
python3 {baseDir}/scripts/ha_bridge.py. RequiresHA_URLandHA_TOKENenvironment variables (see .env.example).
Commands
| Command | What it does | Example |
|---|---|---|
discover |
List all energy entities | ha_bridge.py discover |
energy-summary |
One-shot dashboard (prices + consumption + solar + storage) | ha_bridge.py energy-summary |
status <entity> |
Read a single entity's state and attributes | ha_bridge.py status sensor.electricity_price |
call-service <d/s> |
Call any HA service | ha_bridge.py call-service switch/turn_on --entity-id switch.ev_charger |
history <entity> |
Get state changes over last N hours | ha_bridge.py history sensor.grid_import --hours 24 |
All commands output JSON to stdout.
Load-Shifting Workflow
Follow these steps when asked about energy optimization:
- Discover available energy entities: run
discoverorenergy-summary - Read prices: Check pricing entities' state and attributes — look for:
- Hourly price arrays in
today/tomorrow/prices_today/ratesattributes price_levelattribute (CHEAP / NORMAL / EXPENSIVE)- Current vs. average price comparison
- Hourly price arrays in
- Identify deferrable loads: Find
switch.*entities for schedulable devices (EV charger, pool pump, dishwasher, washer/dryer, water heater) - Find the cheapest window: Scan hourly prices for the contiguous N-hour block with the lowest sum (N = estimated run time of device)
- Execute: Call
switch/turn_onat the optimal time, orautomation/triggerif the user has an existing automation
Interpreting Price Data
Different integrations expose prices differently:
- Hourly arrays (Nordpool, ENTSO-e, Octopus): Read
today/tomorrowattributes → find cheapest hours - Price level (Tibber): Read
price_level→ act when CHEAP or VERY_CHEAP - Real-time (Amber Electric): Read 5-minute pricing → shift loads immediately when cheap
- Utility meter tariffs: Read
sensor.*_peakvssensor.*_offpeak→ user's HA automations switch tariffs at configured times - Static TOU: Read
current_priceattribute → compare against historical average
Cost Savings Estimate
When recommending a shift, show estimated savings:
savings = (current_rate - cheapest_rate) × device_power_kw × run_duration_hours
Solar Self-Consumption
If solar sensors exist, align loads with peak production:
- Read
sensor.forecast_solar_*orsensor.solcast_*for today's forecast - Shift loads to hours with highest expected production
- This avoids grid import entirely — savings = full retail rate × kWh shifted
HVAC Pre-Conditioning
HVAC is the largest residential load (40-50% of electricity). Pre-cool or pre-heat during cheap/solar hours so the home coasts through expensive peak periods:
- Read
climate.*entities for current HVAC mode and setpoint - During cheapest window: lower cooling setpoint by 2-3F (pre-cool) or raise heating setpoint by 2-3F (pre-heat)
- During peak window: raise cooling setpoint by 2-3F to coast on thermal mass
- Savings estimate: 1.5-3 kW shifted × price differential × hours
Water Heater Scheduling
Electric water heaters (4.5 kW typical) are ideal deferrable loads:
- Find
switch.water_heaterorwater_heater.*entities - Heat during cheapest/solar window to full temperature
- Turn off during peak hours (tank maintains temperature for 4-6 hours)
- Savings estimate: 4.5 kW × price differential × 3-4 hours/day
Battery Arbitrage
If home battery entities exist (sensor.battery_soc, sensor.powerwall_*, sensor.enphase_*):
- Read current state of charge and charge/discharge rate limits
- Charge from grid during cheapest hours (or from solar)
- Discharge to home during peak price hours to avoid grid import
- Advanced: If battery supports grid export and VPP enrollment, discharge to grid during extreme price events ($2,000+/MWh)
- Savings estimate: battery_capacity_kwh × (peak_rate - valley_rate)
Demand Response / VPP Integration
For homes enrolled in utility demand response or virtual power plant programs:
- Read demand response signal entities (if available via HA integration)
- When DR event active: shed non-critical loads, pre-cool/pre-heat, discharge battery
- Estimate DR payment: kW reduced × event duration × program rate
Entity Reference
For detailed entity patterns across providers, read: energy_entities.md
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。