When adding a Forecast Provider of type "Home Assistant Api", the user is required to manually fill in a large number of entity IDs for retrieving production forecast data. As shown in the screenshot, the configuration form presents many entity fields:
- Entity Forecast Power Actual H
- Entity Forecast Power Next 1H
- Entity Forecast Power Next 12H
- Entity Forecast Power Next 24H
- Entity Forecast Energy Actual H
- Entity Forecast Energy Next 1H
- Entity Forecast Energy Today
- Entity Forecast Energy Tomorrow
Manually looking up and entering each of these entity IDs from Home Assistant is tedious and error-prone, especially considering that popular Home Assistant integrations like Solcast and Forecast.Solar already expose these entities with predictable naming patterns.
Current Pain Points
-
Too many fields to fill manually: The user must look up and copy 8+ entity IDs from Home Assistant one by one, switching back and forth between the two UIs.
-
Predictable entity naming: Integrations like Solcast and Forecast.Solar follow well-known naming conventions for their entities (e.g., sensor.solcast_pv_forecast_power_now, sensor.energy_production_today). These could be detected automatically.
-
High friction for new users: A new user setting up Edge Mining for the first time may not know which Home Assistant entities correspond to which forecast fields, making the configuration experience frustrating.
Proposed Changes
1. Auto-discover forecast entities from Home Assistant
When the user selects "Home Assistant Api" as the adapter type and links an external service, provide an "Auto-Discover Entities" button that:
- Queries the linked Home Assistant instance for known forecast integration entities (e.g., Solcast, Forecast.Solar).
- Matches discovered entities to the corresponding Edge Mining configuration fields based on known naming patterns.
- Auto-populates the entity fields with the matched entity IDs.
2. Support for known integrations
Implement discovery patterns for at least the following Home Assistant integrations:
| Integration |
Example Entities |
| Solcast |
sensor.solcast_pv_forecast_power_now, sensor.solcast_pv_forecast_power_next_hour, sensor.solcast_pv_forecast_forecast_today, sensor.solcast_pv_forecast_forecast_tomorrow |
| Forecast.Solar |
sensor.energy_production_today, sensor.energy_production_tomorrow, sensor.power_production_now, sensor.energy_current_hour |
The list of supported integrations should be extensible, so additional forecast providers can be added in the future.
3. User confirmation before applying
- After auto-discovery, show the user a preview of the matched entities before populating the fields.
- The user can accept, modify, or dismiss the suggestions.
- Any fields that could not be matched remain empty for manual input.
Visual Reference
See the attached screenshot showing the "Add Forecast Provider" form with "Home Assistant Api" selected. All entity fields are currently empty and marked as optional, requiring manual input.
Acceptance Criteria
When adding a Forecast Provider of type "Home Assistant Api", the user is required to manually fill in a large number of entity IDs for retrieving production forecast data. As shown in the screenshot, the configuration form presents many entity fields:
Manually looking up and entering each of these entity IDs from Home Assistant is tedious and error-prone, especially considering that popular Home Assistant integrations like Solcast and Forecast.Solar already expose these entities with predictable naming patterns.
Current Pain Points
Too many fields to fill manually: The user must look up and copy 8+ entity IDs from Home Assistant one by one, switching back and forth between the two UIs.
Predictable entity naming: Integrations like Solcast and Forecast.Solar follow well-known naming conventions for their entities (e.g.,
sensor.solcast_pv_forecast_power_now,sensor.energy_production_today). These could be detected automatically.High friction for new users: A new user setting up Edge Mining for the first time may not know which Home Assistant entities correspond to which forecast fields, making the configuration experience frustrating.
Proposed Changes
1. Auto-discover forecast entities from Home Assistant
When the user selects "Home Assistant Api" as the adapter type and links an external service, provide an "Auto-Discover Entities" button that:
2. Support for known integrations
Implement discovery patterns for at least the following Home Assistant integrations:
sensor.solcast_pv_forecast_power_now,sensor.solcast_pv_forecast_power_next_hour,sensor.solcast_pv_forecast_forecast_today,sensor.solcast_pv_forecast_forecast_tomorrowsensor.energy_production_today,sensor.energy_production_tomorrow,sensor.power_production_now,sensor.energy_current_hourThe list of supported integrations should be extensible, so additional forecast providers can be added in the future.
3. User confirmation before applying
Visual Reference
See the attached screenshot showing the "Add Forecast Provider" form with "Home Assistant Api" selected. All entity fields are currently empty and marked as optional, requiring manual input.
Acceptance Criteria