Removing HAEO¶
This guide explains how to completely remove the Home Assistant Energy Optimization (HAEO) integration from your system.
Removal process (HACS installation)¶
HAEO is distributed as a HACS custom component, so its files remain on disk after you remove the integration from the Home Assistant UI. Follow the full sequence below to ensure everything is deleted. The steps mirror the official HACS removal guidance:
- Open Settings → Devices & Services.
- Locate "Home Assistant Energy Optimization", open the three-dot menu (⋮), and choose Delete. Confirm the prompt.
- Restart Home Assistant so the config entry unloads cleanly.
- After Home Assistant restarts, delete the
/custom_components/haeo/directory using the File Editor add-on, SSH, or Samba. - Restart Home Assistant again to make sure the component is fully removed and caches are cleared.
Only after the second restart are both the integration configuration and the installed files removed.
What gets deleted¶
When you remove HAEO, the following items are automatically deleted:
- Configuration entries: The hub entry and all element subentries (batteries, grids, loads, generators)
- Entities: All sensors including:
- Power sensors for each element
- Energy sensors for storage elements
- State of charge (SOC) sensors for batteries
- Optimization cost sensor
- Optimization status sensor
- Optimization duration sensor
- Devices: All device registry entries for the hub and elements
- Runtime data: Current optimization state and results
What is preserved¶
The following data remains in your system after removal:
- Historical sensor data: All historical state data stored in the Home Assistant recorder database remains available
- Automations: Any automations that reference HAEO entities will remain but become unavailable (their entities will show as "unavailable")
- Dashboard cards: Dashboard cards showing HAEO sensors will display "Entity not available" until removed
Post-removal cleanup¶
After removing HAEO, you may want to clean up related items:
Remove orphaned automations¶
- Navigate to Settings → Automations & Scenes
- Search for automations that reference HAEO entities
- Edit or delete these automations as needed
Remove dashboard cards¶
- Edit your dashboards (click the three-dot menu → Edit Dashboard)
- Remove any cards that displayed HAEO sensors
- Save your changes
Clear historical data (optional)¶
If you want to remove historical sensor data from the database:
- Navigate to Settings → System → Repairs
- Look for any HAEO-related issues and resolve them
- To completely purge historical data, use the Developer Tools → Services:
Warning: Purging historical data is permanent and cannot be undone.
Manual cleanup (if needed)¶
If the integration was removed while in a bad state or the directory deletion failed, you may need to manually clean up:
Check for orphaned devices and entities¶
- Navigate to Settings → Devices & Services → Devices.
- Search for device names that contained HAEO elements; delete any remaining entries.
- Switch to the Entities tab, enable Show unavailable entities, and remove any lingering
sensor.haeo_*entries.
Reinstalling HAEO¶
If you want to reinstall HAEO after removing it:
- The integration can be re-added through the normal installation process
- Your previous configuration will not be restored automatically
- You will need to reconfigure your energy system from scratch
- Historical data from the previous installation will remain in the database with orphaned entity IDs
Troubleshooting removal¶
If you encounter issues removing HAEO:
Integration still appears in HACS¶
- Open HACS → Integrations and ensure HAEO is no longer listed under Installed.
- If it is, click the entry and choose Uninstall. HACS may prompt you to restart; accept the prompt.
Files reappear after deletion¶
- Verify that no automated backups or version control restores the directory.
- Restart Home Assistant and re-check
/custom_components/haeo/. - If the directory keeps returning, review your Supervisor add-ons or deployment pipeline for sync jobs that re-deploy the integration.
Errors remain in logs¶
- After the final restart, open Settings → System → Logs.
- Clear HAEO-related issues from Settings → System → Repairs.
- If errors persist, reinstall HAEO via HACS, confirm the integration loads, then repeat the removal steps.
Getting help¶
If you continue to experience issues removing HAEO:
- Check the HACS documentation for the latest uninstall notes
- Review the HAEO GitHub Issues
- Create a new issue with:
- Home Assistant version
- HAEO version
- Description of the removal issue
- Relevant error logs
- Steps you've already tried