expose: buy/sell_price_now follow the live dual-tariff slot
Subscribe the separate DSMR tariff topic (dsmr/meter-stats/electricity_tariff, 1=dal/off-peak, 2=normal/peak), keep the latest slot in memory, and make the manual-contract buy/sell_price_now sensors show the matching tariff's price (tariff 1 -> dal, 2/unknown -> normal). Tibber (single 15-min price) unchanged. Billing is untouched (register-split already handles tariffs correctly). - new config dsmr_tariff_topic; subscribe managed by apply_dsmr_subscription (restart-free on config save). In-memory tariff is lock-guarded. - import_cost_total / export_revenue_total cumulative getters unchanged.
This commit is contained in:
@@ -52,6 +52,9 @@ HA_DISCOVERY_PREFIX=homeassistant
|
||||
# DSMR_INGEST_ENABLED=false
|
||||
# DSMR_MQTT_TOPIC=dsmr/json
|
||||
# DSMR_SAMPLE_INTERVAL_S=10
|
||||
# DSMR tariff topic: publishes "1" (dal/off-peak) or "2" (normal/peak).
|
||||
# Empty string disables tariff-aware pricing (buy/sell_price_now always show normal rate).
|
||||
# DSMR_TARIFF_TOPIC=dsmr/meter-stats/electricity_tariff
|
||||
|
||||
# Optional: Tibber dynamic pricing credentials (M6).
|
||||
# Only used when an active energy contract with kind=tibber is configured.
|
||||
|
||||
Reference in New Issue
Block a user