This Home Assistant dashboard is built for SunPower PV systems using InfluxDB, krbaker/hass-sunpower, SunStrong-Management/pvs-hass, and several other HACS components. A Bash script powers the data queries, enabling solar production visualization over time, historical browsing, and latest updates in "live" mode.
- Features
- What this is
- What this is not
- Tested On
- Required Integrations
- Repo Components
- Screenshots
- Setup Instructions
- Troubleshooting
- Credits
- Display individual solar panel production in a custom dashboard.
- Select a date to view historical data.
- Select a time using a 24-hour preview graph and slider.
- Toggle Live View for the most recent data.
- Toggle Power to display production in Watts at a specific time.
- Toggle Energy to display production in kWh up to a specific time.
- Timelapse through a day's production.
- A Home Assistant dashboard for SunPower systems using the krbaker/hass-sunpower or SunStrong-Management/pvs-hass HACS integration.
- A bash script (
query_panels.sh) to query InfluxDB for power or energy values and save them as Home Assistant sensors. - An example dashboard (
dashboard.yaml) that uses the queried data. You need to customize your own panel layout.
- ❌ This setup does not provide additional panel-level details. It uses data from your SunPower PVS
- ❌ This will not work without a functional krbaker/hass-sunpower or SunStrong-Management/pvs-hass integration.
- ❌ It will not retroactively populate historical data — InfluxDB will collect data going forward if it is a first time setup.
- ❌ It will not automatically create YOUR panel layout. Use the example to customize your own placement.
- Home Assistant OS
- SunPower PVS6
- InfluxDB 1.x
Built using these amazing integrations!
| Integration | Repository |
|---|---|
hass-sunpower |
krbaker/hass-sunpower |
pvs-hass |
SunStrong-Management/pvs-hass |
button-card |
custom-cards/button-card |
mod-card |
thomasloven/lovelace-card-mod |
apexcharts-card |
RomRider/apexcharts-card |
mushroom |
piitaya/lovelace-mushroom |
| File / Folder | Purpose |
|---|---|
query_panels.sh |
Bash script to query InfluxDB for power/energy data |
configuration.yaml |
Required changes for Home Assistant's configuration.yaml |
dashboard.yaml |
Example Home Assistant dashboard |
automation_refresh_panels.yaml |
Automation to refresh panels when selections change |
automation_timelapse_panels.yaml |
Automation to timelapse through a day |
panel_layout_trans.png |
Transparent background image expected in /config/www/images/ |
Before starting, consider trying this during the day. It is easier to troubleshoot when inverters are online
- Install Required HACS Integrations
query_panels.shsupports bothhass-sunpowerandpvs-hassintegrations (pick one). Defaults tohass-sunpower.- Required Integrations
- Setup InfluxDB
(This setup relies on InfluxDB 1.x to store SunPower production data. If already setup, skip to: Optional.)
- Install the InfluxDB Home Assistant add-on here: Install InfluxDB. If setting up InfluxDB for the first time, historical data starts from now onward.
- Read the add-on documentation Integrating into Home Assistant. Create at least 1 new user with read/write access to the "homeassistant" database. (e.g.,
homeassistant). - See the included configuration.yaml for a sample INFLUXDB configuration. Add to it your own configuration.yaml
- Save the new username and password in
secrets.yamlas
influxdb_user: homeassistant influxdb_pass: yourpassword - Save the new username and password in
- Restart Home Assistant
- Optional: create a new InfluxDB user with read-only access to the homeassistant database for the query_panels.sh script. (e.g.,
powermonitor)
- Set up
query_panels.sh
(If you change paths make sure dashboard.yaml sensors and command match)
- Create a
scriptsdirectory, in your Home Assistant config path. Copyquery_panels.sh(e.g.,/config/scripts/query_panels.shor/home/pi/.homeassistant/scripts/query_panels.sh). - Edit
query_panels.shand replace the InfluxDB connection information.
INFLUXDB_HOST="localhost:8086"
USERNAME="powermonitor"
PASSWORD="password"
DATABASE="homeassistant"
- Check the ${DATA_DIR} path, created by the script, works for your Home Assistant install. The included
configuration.yamlentries will need an update if changed.
DATA_DIR="/config/power" ### files written by this script
ENTITIES="${DATA_DIR}/entities.txt"
GRAPH_OUT="${DATA_DIR}/graph.json"
PANELS_OUT="${DATA_DIR}/panels.json"
- Overrride the integration polling your PVS. (defaults to
hass-sunpower)
INTEGRATION="pvs-hass" ### "hass-sunpower" (https://github.com/krbaker/hass-sunpower). (default)
### "pvs-hass" (https://github.com/SunStrong-Management/pvs-hass)
### "custom" (see below)
### always run --discover after changing INTEGRATION
- Execution rights (e.g.,
chmod +x /config/scripts/query_panels.sh). - Run
query_panels.sh --discoverto attempt sensor discovery. If successful, it will print the sensor entities needed in configuration.yaml and store them. (e.g.,/config/power/entities.txt) - Sensor IDs will vary depending on integration, hass-sunpower is used in most examples.
/config/scripts/query_panels.sh --discover
Expecting integration 'hass-sunpower'
Discovering lifetime_power and matching power sensors...
Use below in configuration.yaml for the timelapse_power_panels json_attributes
- power_meter_pvs6mxxxxxxxxp_power
- inverter_e00122xxxxxxxxxx_power
- inverter_e00123xxxxxxxxxx_power
- Update
configuration.yaml
- Review the included
configuration.yamland add it to your ownconfiguration.yaml(sensors, inputs, shell commands). - Update any paths you may have changed for
query_panels.sh. The shell_command points to the location ofquery_panels.sh. - Review
/config/power/entities.txt. It should contain the sunpower entities after running (/config/scripts/query_panels.sh --discover) - Replace the
json_attributesinconfiguration.yaml, for the command line sensor timelapse_power_panels, with the result ofquery_panels.sh --discover.json_attributes: - inverter_e00122xxxxxxxxxx_power - inverter_e00123xxxxxxxxxx_power - power_meter_pvs6mxxxxxxxxp_power- Make sure all discovered entities are added.
- Restart Home Assistant.
- Import Automations and Scripts
- Add
automation_refresh_panels.yamlto your automations - Add
automation_timelapse_panels.yamlto your automations
- Load the Example Dashboard
- Copy
panel_layout_trans.pngto/config/www/images/. - Copy
dashboard.yamland add it as a new dashboard in Home Assistant’s UI. - Review the notes in dashboard.yaml for customization (colors, thresholds, intervals). Some comments will not get saved in the Home Assistant UI.
- The dashboard is responsive and displays best in portrait orientation.
- Each solar panel is an individual card that needs to be associated with its corresponding sensor_id in the next step.
- Customize the Dashboard
- To accurately place the panels on the dashboard you must already know their layout or physical placement. Consult your install documentation or the SunPower app to identify the location of each panel by serial number.
- Use the results from
query_panels.sh --discover - In
dashboard.yamlreplace the templatetriggers_update: power_meter_pvs6mxxxxxxxxp_powerwith the main production meter entity. (pvs-hass uses:meter_pvs6mXXXXXXXp_3_phase_power) - Match each panel (card) to its corresponding entity id
power_key: inverter_e00122xxxxxxxxxx_power. (pvs-hass uses:mi_e00XXXXXXXXXXXX_current_power_production)
- type: custom:button-card
template: solar_panel
variables:
power_key: inverter_e00122xxxxxxxxxx_power ### EACH PANEL MUST BE ASSOCIATED TO ITS CORRESPONDING JSON ATTRIBUTE IN CONFIGURATION.YAML timelapse_power_panels
style: ### ADJUST PER PANEL, TO SET LOCATION
left: 7%
top: 30%
styles:
card: ### HORIZONTAL LAYOUT OVERRIDE, REMOVE FOR VERTICAL
- height: 5vw
- width: 10vw
- Match the main production sensor
power_key: power_meter_pvs6mxxxxxxxxp_powerto the TOTAL PRODUCTION card. The entity or device has a trailing "p" after the serial number. (pvs-hass uses:meter_pvs6mXXXXXXXp_3_phase_power)
- type: custom:button-card
template: solar_panel
variables:
power_key: power_meter_pvs6mxxxxxxxxp_power ####TOTAL PRODUCTION POWER METER
- If you are using the legacy names, the device ID includes the serial number to help you identify each panel.
- Remove or add any necessary cards to match your panel count.
- Buttons use white text and may be hard to read if you're using a light theme.
"Query failed. Is InfluxDB running?"
- Check the InfluxDB service is started on HomeAssistant
- Make sure the host, username and password are correct in query_panels.sh
- Check the user has read permissions to the homeassistant database.
query_panels.sh --discover is empty
- In the absence of "Query failed", this means the entities could not be found in InfluxDB
- Check the InfluxDB user (in
query_panels.sh), has read access to thehomeassistantdatabase - Check the InfluxDB
configuration.yamldetails, and make sure homeassistant restarts if changed. - Query the database using:
SHOW TAG VALUES FROM "kWh" WITH KEY = "entity_id"- This should list all your energy entities. If missing, check [krbaker/hass-sunpower] and InfluxDB settings (the database is not collecting).
- SunPower entities exist, but
--discoverdidn't find them?- Try adding them manually to
/config/power/entities.txt
- power - power_10 - power_11 - power_12 - power_13 - power_14 - power_15 - Try adding them manually to
Zeros, Gray Panels
- Verify
query_panels.shcan pull data from InfluxDB. - Run
/config/scripts/query_panels.shfor usage (e.g.,/config/scripts/query_panels.sh -d 2025-07-31 -h 14 -e inverter_e00122xxxxxxxxxx_power -m max -m power). - Test any entity found during
query_panels.sh --discover, also stored at/config/power/entities.txt- Use a time and date after your inital InfluxDB and [krbaker/hass-sunpower] setup.
- You will get empty values from dates that predate your InfluxDB setup. Zeros are expected at night.
- Check each panel (card) in the
dashboard.yamlhas its corresponding power_key: with the correct sensor
TOTAL doesn't work
- This card is in the
dashboard.yamllabeled "PRODUCTION POWER METER" - Check the card has its corresponding power_key: with the correct sensor, usually has a trailing "p" in the device and sensor ids. (e.g.,
power_meter_pvs6mxxxxxxxxp_power)
Broken UI
- Check each card has the correct association to a power sensor
- Check
configuration.yamland make sure timelapse_power_panels has the correct json_attributes. This should be the output ofentities.txtafter--discover.
Missing Labels
- The example dashboard is expecting a "dark" theme. Some text labels are set to "white".
Live Mode doesnt update, needs a refresh
- Trigger the button_card template in
dashboard.yamlwith the main production power meter:
button_card_templates:
solar_panel:
triggers_update: power_meter_pvs6mxxxxxxxxp_power ####TOTAL PRODUCTION POWER METER
This dashboard relies on several amazing Home Assistant integrations.
- krbaker/hass-sunpower — SunPower integration.
- SunStrong-Management/pvs-hass - SunStong integration.
- custom-cards/button-card — Custom button cards.
- thomasloven/lovelace-card-mod — Styling and card modifications.
- RomRider/apexcharts-card — Charts and graphs.
- piitaya/lovelace-mushroom — Number Input slider.
Thanks to everyone involved in these projects for their excellent work!
- u/badxhabit28 — Thanks for helping me test!


