Skip to content
Open
13 changes: 13 additions & 0 deletions .cspell/custom-dictionary-workspace.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ autoflake
automations
autopep
autoupdate
awattar
axvline
axvspan
Backfeed
Expand Down Expand Up @@ -171,12 +172,14 @@ dstamp
dstart
dtype
dwindow
Dynamisch
eauth
echargingpile
ecosmart
Eddi
eddis
efgh
Elektrizitätswerke
elif
elinter
eload
Expand Down Expand Up @@ -374,7 +377,11 @@ lstrip
luxpower
malloc
mallopt
malo
malos
markdownlint
marketdata
marketprice
matplotlib
maximise
maxrss
Expand Down Expand Up @@ -473,6 +480,7 @@ openapi
openrouter
openweathermap
Opticaster
ostrom
overclaim
overfitting
oversizing
Expand Down Expand Up @@ -578,6 +586,8 @@ saverestore
savez
scalarstring
scalings
schoenau
Schönau
searr
securetoken
Segoe
Expand Down Expand Up @@ -655,6 +665,7 @@ syscmd
sysdn
syssn
tabindex
tado
tasmota
TCWORLD
tdata
Expand All @@ -679,6 +690,7 @@ timekey
timelapse
timenow
timeobj
timespec
timestep
timestr
timezone
Expand Down Expand Up @@ -767,3 +779,4 @@ zappi
zappis
zcat
zigbee
Ökostrom
20 changes: 15 additions & 5 deletions apps/predbat/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,14 +583,23 @@ def load_component_class(component_info):
"class": "spotprice.SpotPriceAPI",
"name": "Day-ahead Spot Price Tariff",
"args": {
# No registry default: when unset, initialize() picks tibber whenever a Tibber token is set
# (with or without a zone), else energycharts
# No registry default: when unset, initialize() picks the one supplier whose credentials are
# set (with or without a zone), else energycharts; credentials for several is a config error
"provider": {"required": False, "config": "spotprice_provider"},
"zone": {"required": False, "config": "spotprice_zone"},
"entsoe_token": {"required": False, "secret": True, "config": "spotprice_entsoe_token"},
"tibber_token": {"required": False, "secret": True, "config": "spotprice_tibber_token"},
"tibber_home_id": {"required": False, "secret": True, "config": "spotprice_tibber_home_id"},
"ostrom_client_id": {"required": False, "secret": True, "config": "spotprice_ostrom_client_id"},
"ostrom_client_secret": {"required": False, "secret": True, "config": "spotprice_ostrom_client_secret"},
"ostrom_contract_id": {"required": False, "secret": True, "config": "spotprice_ostrom_contract_id"},
"octopus_de_api_key": {"required": False, "secret": True, "config": "spotprice_octopus_de_api_key"},
"octopus_de_account": {"required": False, "secret": True, "config": "spotprice_octopus_de_account"},
"octopus_de_malo": {"required": False, "secret": True, "config": "spotprice_octopus_de_malo"},
"ews_api_key": {"required": False, "secret": True, "config": "spotprice_ews_api_key"},
"markup": {"required": False, "config": "spotprice_markup", "default": 0.0},
# No registry default: when unset, initialize() uses the provider's published percentage (3 for awattar), else 0
"markup_percent": {"required": False, "config": "spotprice_markup_percent"},
"vat": {"required": False, "config": "spotprice_vat", "default": 0.0},
"charge_zones": {"required": False, "config": "spotprice_charge_zones", "default": []},
"exchange_rate": {"required": False, "config": "spotprice_exchange_rate", "default": 1.0},
Expand All @@ -601,9 +610,10 @@ def load_component_class(component_info):
"automatic": {"required": False, "config": "spotprice_automatic", "default": True},
},
# The provider defaults to energycharts, so gate on what a real configuration must carry: a
# bidding zone for the spot sources, or a Tibber token. Without this the component would
# start on every install.
"required_or": ["zone", "tibber_token"],
# bidding zone for the spot sources, or a supplier's credentials (either half of a pair is
# enough to start it, so a missing other half is reported rather than silently ignored).
# Without this the component would start on every install.
"required_or": ["zone", "tibber_token", "ostrom_client_id", "ostrom_client_secret", "octopus_de_api_key", "ews_api_key"],
"can_restart": True,
"phase": 1,
},
Expand Down
10 changes: 9 additions & 1 deletion apps/predbat/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2871,12 +2871,20 @@
"iboost_energy_today": {"type": "sensor", "sensor_type": "float"},
"metric_octopus_gas": {"type": "sensor", "sensor_type": "float"},
"rates_gas": {"type": "dict_list"},
"spotprice_provider": {"type": "string", "empty": False, "allowed": ["entsoe", "energycharts", "tibber"]},
"spotprice_provider": {"type": "string", "empty": False, "allowed": ["entsoe", "energycharts", "tibber", "ostrom", "octopus_de", "awattar", "ews"]},
"spotprice_zone": {"type": "string", "empty": False},
"spotprice_entsoe_token": {"type": "string", "empty": False},
"spotprice_tibber_token": {"type": "string", "empty": False},
"spotprice_tibber_home_id": {"type": "string", "empty": False},
"spotprice_ostrom_client_id": {"type": "string", "empty": False},
"spotprice_ostrom_client_secret": {"type": "string", "empty": False},
"spotprice_ostrom_contract_id": {"type": "string|integer", "empty": False},
"spotprice_octopus_de_api_key": {"type": "string", "empty": False},
"spotprice_octopus_de_account": {"type": "string", "empty": False},
"spotprice_octopus_de_malo": {"type": "string|integer", "empty": False},
"spotprice_ews_api_key": {"type": "string", "empty": False},
"spotprice_markup": {"type": "float"},
"spotprice_markup_percent": {"type": "float"},
"spotprice_vat": {"type": "float"},
"spotprice_charge_zones": {"type": "dict_list"},
"spotprice_exchange_rate": {"type": "float"},
Expand Down
Loading
Loading