Install
openclaw skills install tibber-energyUse Tibber API data to fetch hourly spot prices, plan cheapest appliance or EV charging windows, detect consumption anomalies, and trigger smart-home actions...
openclaw skills install tibber-energyUse when the user asks about:
Set environment variables before running:
export TIBBER_ACCESS_TOKEN="your_tibber_token"
export TIBBER_HOME_ID="optional_home_id"
TIBBER_HOME_ID is optional if the account has one home.
You can also copy .env.example to .env and fill values locally:
cp .env.example .env
Alternatively, for shareable/persistent configuration, create:
~/.config/tibber-energy/config.json
You can copy the template from this repo:
cp config.json.example ~/.config/tibber-energy/config.json
The scripts will use credentials in this order:
TIBBER_*)~/.config/tibber-energy/config.json--prompt-missing-secrets)Use the wrapper from the skill directory:
bash run.sh prices
bash run.sh prices --hours 36
Estimate hours from kwh / power-kw, then find cheapest contiguous block:
bash run.sh optimize \
--kwh 28 \
--power-kw 11 \
--window-start "2026-04-27T18:00:00+02:00" \
--window-end "2026-04-28T08:00:00+02:00"
For fixed duration instead of kWh:
bash run.sh optimize --duration-hours 2
bash run.sh anomalies --lookback-hours 168 --sigma 2.5
Use shell commands for your automation endpoint, Home Assistant script, or smart plug CLI.
Dry-run:
bash run.sh control \
--price-below 0.15 \
--on-command "ha service call switch.turn_on --entity_id switch.ev_charger" \
--off-command "ha service call switch.turn_off --entity_id switch.ev_charger"
Execute commands:
bash run.sh control \
--price-above 0.35 \
--on-command "ha service call switch.turn_on --entity_id switch.boiler" \
--off-command "ha service call switch.turn_off --entity_id switch.boiler" \
--execute
currentSubscription.priceInfo (today + tomorrow).--execute..env with real access tokens.--execute off until threshold logic is verified in dry-run.--on-command and --off-command as trusted input only (they run as shell commands).--prompt-missing-secrets only when you want to enter credentials interactively.SKILL.md, run.sh, tibber_energy.py, .env.example, config.json.example, .gitignore.env, __pycache__/, local logs, temporary filescp .env.example .env and fill valid credentialsbash run.sh prices --hours 6bash run.sh optimize --duration-hours 2bash run.sh anomalies --lookback-hours 168 --sigma 2.5bash run.sh control --price-below 0.15 --on-command "echo on" --off-command "echo off"