How data updates work¶
This guide explains how HAEO keeps its recommendations current. Use it to understand where the data comes from, what prompts an optimization, and how to give the system a gentle nudge when needed.
How HAEO receives data¶
HAEO uses an intermediate input entity layer to receive data from external sensors.
Each configuration field that accepts sensor data creates a corresponding input entity (Number or Switch) in Home Assistant.
These input entities load values from external sensors you select, transform them as needed, and make them available with a forecast attribute containing time-series data.
Input entities operate in one of two modes:
- Editable: Constant value you configure directly (e.g., battery capacity)
- Driven: Value loaded from an external sensor or forecast (e.g., electricity prices)
You can find input entities in Home Assistant's entity list with the config entity category.
They appear with names like number.{element}_{field} (for example, number.battery_capacity).
What triggers an optimization¶
HAEO runs a new optimization when either of the following happens:
- An input entity's state changes (new data arrives from a tracked sensor).
- The optimization horizon advances past a period boundary.
The system is event-driven with guaranteed updates at horizon boundaries (for example, every 1 minute for the finest tier). When sensor data changes between boundaries, the corresponding input entity updates, which triggers a new optimization.
To avoid running multiple optimizations in quick succession, HAEO uses internal debouncing. Related updates that arrive close together are grouped, and optimization runs after activity settles.
Manual refresh options¶
Sometimes you want the latest recommendation right away. You can trigger a manual refresh from the entity details page or by calling the standard Home Assistant update service for any HAEO sensor. Manual refreshes skip the waiting period and start a new optimisation as soon as they are invoked.
Troubleshooting stale data¶
If the values stop moving, first check your input entities:
- Navigate to Developer Tools → States
- Search for
number.orswitch.prefixed with your element names to find input entities - Verify each input entity shows a valid state and has a
forecastattribute with time-series data
If input entities show valid data but sensors still seem stale:
- Confirm the upstream source sensors are still reporting
- Check that HAEO is loaded without issues in the Integrations screen
- A quick manual refresh tests whether the optimizer can run with available data
Persistent problems usually point to missing inputs or external services that need attention.
Monitor your system occasionally to ensure updates finish comfortably within the time windows that matter for your automations. Long optimization runs usually mean the problem has become quite large, so start by simplifying inputs before you tweak the look-ahead horizon. Review the interval tier guidance before changing that value.
Debugging updates¶
Enable debug logging¶
To see detailed update information:
Logged information:
- Update trigger sources
- Data collection timing
- Optimization solve time
- Result processing steps
- Error details and stack traces
Check coordinator status¶
Use developer tools to inspect the system state:
- Navigate to Developer Tools → States
- Find input entities (Number and Switch entities for your configured elements) and check their states and
forecastattributes - Find output sensors and check their states and attributes
- Check the optimization status sensor for error messages
Monitor with automations¶
Create automations to alert on persistent optimization failures:
automation:
- alias: HAEO persistent failure alert
trigger:
- platform: state
entity_id: sensor.{network_name}_optimization_status
to: failed
for:
minutes: 15
action:
- service: notify.persistent_notification
data:
title: HAEO optimization failing
message: >
HAEO has failed to optimize for 15 minutes.
Check configuration and logs.
See the Automations guide for more monitoring examples.
Using updated sensors in automations¶
HAEO sensors update automatically when new optimizations complete. Automations can trigger on state changes to respond to updated recommendations.
See the Automations guide for complete examples of:
- Applying battery charge/discharge recommendations
- Solar curtailment based on optimization
- Notifications on optimization failure
- Safety checks and override patterns
Key considerations when building automations:
- Check sensor availability before using values
- Add rate limiting to prevent rapid hardware changes
- Include manual override mechanisms
- Prioritize safety systems above optimization recommendations
Frequently asked questions¶
Why do sensors sometimes show "unavailable"?¶
Sensors become unavailable when:
- Optimization fails to find a solution
- Required data sources are offline
- Configuration errors prevent optimization
- Integration is initializing
Check the system logs for optimization error messages.
How can I speed up updates?¶
HAEO is event-driven, so optimizations run immediately when input data changes. To improve responsiveness:
- Ensure your source sensors update frequently (check their polling intervals)
- Adjust interval tiers for faster solving (reduce tier counts or increase durations) after consulting the interval tier guidance
- Simplify network topology when possible
- Trigger manual updates via service calls when you need immediate feedback
How do I inspect input entity data?¶
Input entities are visible in Home Assistant's entity list with the config entity category.
Each input entity has a forecast attribute containing the time-series data used for optimization.
To inspect input data:
- Navigate to Developer Tools → States
- Search for your element names (e.g.,
number.battery_orswitch.solar_) - Expand the
forecastattribute to see the time-series data
See the Input Entities guide for more details on how input entities work.
Do I need to restart Home Assistant after configuration changes?¶
No. Configuration changes through the UI take effect immediately:
- Element settings updates trigger optimization refresh
- New connections rebuild network and re-optimize
- Sensor changes detected automatically
Only changes to integration code (development) require restart.
Next Steps¶
Focus on these areas to keep data updates reliable and useful.
-
Tune configuration settings
Adjust horizon, period, and solver options to balance accuracy and speed.
-
Monitor optimization performance
Track solve duration and update frequency to spot bottlenecks.
-
Automate responses to new data
Trigger actions when HAEO publishes fresh recommendations.
-
Resolve persistent issues
Work through common problems when data updates fall behind.