v0.1.33
What's New
Bus event for optimization decisions
The integration now fires an HA bus event whenever the Heartbeat AI announces a new optimization decision:
event_type: onekommafive_optimization_decision
event_data:
system_id: <system uuid>
asset: BATTERY | HEATPUMP
decision: BATTERY_CHARGE_FROM_GRID | HEATPUMP_RECOMMEND_ON | …
from: ISO-8601 start of the slot
to: ISO-8601 end of the slot
market_price: float | null # EUR/MWh
market_price_currency: string | null
state_of_charge: int | nullThis unlocks pure HA automations directly tied to the AI — no polling sensor attributes, no template gymnastics. Example: switch on the dishwasher whenever the AI plans grid charging:
trigger:
- platform: event
event_type: onekommafive_optimization_decision
event_data:
decision: BATTERY_CHARGE_FROM_GRID
action:
- service: switch.turn_on
target:
entity_id: switch.dishwasherThe first refresh after a Home Assistant restart fires one event for the most recent decision — so the wiring is immediately verifiable in Developer Tools → Events. The day's earlier decisions are not replayed.
Debug logging around the event path
Three debug log lines make it easy to verify the feature without listening on the bus first:
No optimization events from API; nothing to fireFirst refresh — firing 1 event for the latest decision (from_time=…)Refresh — N/M events newer than last_fired_from_time=… will fire- Plus a
Firing onekommafive_optimization_decision: …line per actually fired event.
Enable with:
logger:
logs:
custom_components.onekommafive: debugFull changelog
See CHANGELOG.md.