Smart Home Energy Optimizer
Optimize home energy usage based on occupancy and electricity rates
Prerequisites
- OpenClaw installed and running
- Home Assistant or similar smart home hub
- Smart thermostat (Nest, Ecobee, etc.)
- Telegram account for notifications
- Time-of-use electricity plan (recommended)
Required Skills
openclaw install home-assistantopenclaw install nest-thermostatopenclaw install telegram-botInstallation Steps
Install required skills
Install the Home Assistant, Nest thermostat, and Telegram bot skills.
openclaw install home-assistant nest-thermostat telegram-botConnect Home Assistant
Configure the Home Assistant API connection with your instance URL and long-lived access token.
Set up occupancy detection
Configure motion sensors and/or phone location tracking for occupancy detection. Set the away threshold.
Define energy schedules
Enter your electricity provider's peak and off-peak hours. Configure temperature settings for each mode.
Add the config snippet
Copy the configuration below and adjust the temperature settings, device priorities, and occupancy thresholds.
Configuration
{
"optimization": {
"strategy": "cost-saving",
"devices": {
"hvac": {
"peakHours": {"temp": 78, "mode": "eco"},
"offPeakHours": {"temp": 72, "mode": "comfort"},
"awayMode": {"temp": 80}
},
"appliances": {
"schedule": "off-peak",
"priority": ["washer", "dryer", "ev-charger"]
}
},
"occupancy": {
"detection": ["motion-sensors", "phone-location"],
"awayThreshold": "30min"
}
}
}Add this to your openclaw.json and customize the values for your setup.
SOUL.md
## Energy Optimization Judgment
- Comfort over savings when people are home. Never drop below 70F or above 80F when occupied — people will just override you and lose trust in the system.
- Ramp temperature changes gradually (2 degrees per 30 min). Abrupt swings feel jarring and waste energy on overshoot.
- If guests are detected (more motion sensors active than usual), switch to comfort mode regardless of schedule. Don't make guests uncomfortable to save a few cents.
- On extreme weather days (below 20F or above 100F), ignore off-peak scheduling for HVAC. Safety and comfort override cost optimization.
- When a family member manually overrides a setting, respect it for 4 hours before resuming automation. They had a reason.
- EV charging is the most flexible load — always schedule it last in the priority chain since it has the largest off-peak window.Add this to your SOUL.md to define the agent's behavior for this workflow.
Expected Behavior
OpenClaw monitors electricity rates and home occupancy, automatically adjusting thermostat settings and scheduling high-power appliances during off-peak hours to minimize energy costs while maintaining comfort when home.
Usage Guide
The optimizer runs continuously. When you leave home (no motion for 30 min), it switches to away mode. During peak hours, it uses eco settings. High-power appliances like the washer, dryer, and EV charger are automatically scheduled for off-peak hours. Monthly savings reports are sent via Telegram.