Setup & Installation
Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:
Version History
v1.0.3 Security Added domain allowlist to call-service command in ha_bridge.py. Only energy-related HA service domains are permitted: switch, automation, script, climate, water_heater, input_boolean, input_number, number. Unauthorized domains are rejected with exit code 2. Added comprehensive Security section to SKILL.md documenting required credentials, least-privilege token recommendations, and the domain allowlist. Fixed Replaced em dashes with hyphens across all files (ha_bridge.py, SKILL.md, README.md). Removed degree symbols from HVAC section in SKILL.md. Added missing docstring to main() in ha_bridge.py. Updated call-service description from "Call any HA service" to "Call an energy-related HA service (restricted to allowed domains)". Fixed SKILL.md metadata parsing by migrating environment variables to the official ClawHub requires: env: schema. Removed Removed .env.example file and custom .env loading function from ha_bridge.py per ClawHub validation. The skill now strictly relies on system environment variables (os.environ).
What This Skill Does
Reads electricity prices, solar production forecasts, battery state of charge, and consumption data from Home Assistant to schedule deferrable household loads during cheapest rate windows. Supports EV charging, HVAC pre-conditioning, pool pumps, dishwashers, laundry, and water heaters. Also handles battery arbitrage and virtual power plant demand response signals.
Works with all major dynamic pricing providers (Nordpool, Tibber, Octopus Energy, Amber Electric, ENTSO-e) and controls multiple device types through a single Home Assistant interface, eliminating the need for separate per-device automations.
When to use it
- Scheduling EV charging to overnight off-peak rate hours
- Pre-cooling home during cheap solar hours before afternoon peak pricing
- Deferring water heater to lowest-price window each day
- Charging home battery from grid at valley prices and discharging during peak
- Participating in utility demand response events to shed loads and earn payments
Example Workflow
Here's how your AI assistant might use this skill in practice.
User asks: When is the cheapest time to run my EV charger tonight?
- 1Run energy-summary to retrieve current electricity prices, solar forecast, and battery state
- 2Read the hourly price array from the pricing entity's today/tomorrow attributes
- 3Find the contiguous window matching the EV's estimated charge duration with the lowest total cost
- 4Calculate estimated savings compared to charging at the current rate
- 5Call switch/turn_on on the EV charger entity at the optimal start time
EV charger scheduled for 02:00-05:00 at $0.08/kWh, saving $1.84 vs charging now at $0.31/kWh
Requirements
Accounts, API keys, or tools you or your AI assistant may need to set up while using this skill.