Install
openclaw skills install @pmagnomuller/omie-energyFetch Iberian day-ahead electricity prices for Portugal and Spain from OMIE via the OMIEData library, plan cheapest appliance or EV charging windows, compare PT vs ES prices, and trigger smart-home actions from price thresholds.
openclaw skills install @pmagnomuller/omie-energyUse when the user asks about:
Install Python dependencies once:
python3 -m pip install -r requirements.txt
No API credentials are required — OMIE publishes day-ahead marginal prices publicly.
Optional default area (PT or ES):
export OMIE_AREA="PT"
You can also copy .env.example to .env:
cp .env.example .env
Alternatively, for shareable/persistent configuration, create:
~/.config/omie-energy/config.json
cp config.json.example ~/.config/omie-energy/config.json
Configuration precedence:
OMIE_*)~/.config/omie-energy/config.jsonPTUse the wrapper from the skill directory:
bash run.sh prices
Portugal (default):
bash run.sh prices --hours 36
Spain:
bash run.sh prices --area ES --hours 36
Custom date window:
bash run.sh prices --area PT --start 2026-06-01 --end 2026-06-07 --hours 48
Estimate hours from kwh / power-kw, then find cheapest contiguous block:
bash run.sh optimize \
--area PT \
--kwh 28 \
--power-kw 11 \
--window-start "2026-06-20T18:00:00+01:00" \
--window-end "2026-06-21T08:00:00+01:00"
For fixed duration instead of kWh:
bash run.sh optimize --area PT --duration-hours 2
bash run.sh compare --hours 24
Thresholds use EUR/kWh (divide OMIE EUR/MWh by 1000).
Dry-run:
bash run.sh control \
--area PT \
--price-below 0.10 \
--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 \
--area PT \
--price-above 0.20 \
--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
OMIEData Python package.PRICE_PT (Portugal), PRICE_SP (Spain).Europe/Lisbon).H25 on daylight-saving transition days.--start/--end.optimize and control use EUR/kWh internally for threshold compatibility with other energy skills.--execute..env local if you use it for preferences.--execute off until threshold logic is verified in dry-run.--on-command and --off-command as trusted input only (they run as shell commands).SKILL.md, run.sh, omie_energy.py, requirements.txt, .env.example, config.json.example, .gitignore.env, __pycache__/, local logs, temporary filespython3 -m pip install -r requirements.txtbash run.sh prices --area PT --hours 6bash run.sh prices --area ES --hours 6bash run.sh compare --hours 6bash run.sh optimize --area PT --duration-hours 2bash run.sh control --area PT --price-below 0.10 --on-command "echo on" --off-command "echo off"