Total Beginner Documentation

(I hope this is the right place - apologies if not)
I installed Home Assistant because I wanted a better interface to monitor my GoodWe inverter/battery/panel setup. However the default ‘Energy Distribution’ graphic is certainly NOT what I want (I want the current wattages and not the total for the day). Currently all of the values for the ‘Solar’, ‘Grid’, Battery’ and ‘Home’ are the same. Also the ‘Energy’ sidebar tab shows a number of cards that (as far as I can see) can’t be edited but also don’t seem to show useful information (the ‘Net returned to the Grid’ is always 0%!)
I’ve looked at some of the introductory documentation and also the Developer docs but they all start by saying that you edit the json files - but not how! (Alternatively they are all about how to install Home Assistant but I’ve done that!)
I am obviously missing something totally basic but where are the files that need to be edited stored, what is the proper way to edit these and then have them become active.
(I’m totally new to Home Automation but I have many years experience in the IT field - it is making the leap from my IT knowledge to how it is applied to Home Automation that I’m probably missing.)
Susan

There are certainly no user docs which say to edit json files. Some developer stuff may, but I wouldn’t recommend going there as a newcomer. (Welcome by the way)

The energy page measures energy over time, as you have observed daily (and weekly, monthly totals).

If you tell us what devices you have added and what entities they have added, we’ll give you a hand.

1 Like

Thank you @nickrout for replying.
The device is “GoodWe” (a GW5048D-ES) that has (according to the Settings page ‘Device’ page) no automations, scenes or scripts, and no logbook entries.
There are 61 entities (I won’t bother to list them all!)
What I would like to see are:

  • Current wattages: PV generation, house consumption, battery (charging/discharging), grid (importing, exporting)
  • Battery status (% charge)
  • Total wattages for the day: PV generation, house consumption, grid imports and exports

Reading a bit more, (and putting aside the json/yaml difference [which some consider moot in this situation]) am I right in understanding that each device has various entities that are displayed on cards by default. If you want to alter those defaults then you edit the 'configurations.yaml file and identify the device.

Looking at the ‘Energy’ dashboard (Settings > Dashboards > Energy) settings, it look s like I can only get the daily totals. When I click on the various ‘pencil’ icons to edit what is shown, and go to the ‘Why is my entity not listed’ link, it indicates that this is considered an error in the integration provided by the entity.

Therefore, is this something that I can set for myself in the ‘configurations.yaml’ file, or does the integration creator need to do something?

Susan

Well unless we know what entities you have, and what they actually measure, it is hard to help.

Those entities contain all the data your inverter provides. You will have to assign them to the correct areas in the energy dashboard settings.

About the current values: the energy dashboard is about the amount of energy consumed over time. Bit you can create your own dashboard with current values from settings/dashboard create new and then add the cards that represent the entities with the current values.

That assumes there are energy sensors. If they are only power sensors there is more that needs doing.

OK - Here are the 621 sensors: (the display name and then the entity ID)
Back-up Current sensor.back_up_current
Back-up Frequency sensor.back_up_frequency
Back-up Power sensor.back_up_power
Back-up Voltage sensor.back_up_voltage
Battery Charge Limit sensor.battery_charge_limit
Battery Current sensor.battery_current
Battery Discharge Limit sensor.battery_discharge_limit
Battery Error Code sensor.battery_error_code
Battery Mode sensor.battery_mode
Battery Mode code sensor.battery_mode_code
Battery Power sensor.battery_power
Battery State of Charge sensor.battery_state_of_charge
Battery State of Health sensor.battery_state_of_health
Battery Status sensor.battery_status
Battery Temperature sensor.battery_temperature
Battery Voltage sensor.battery_voltage
Battery Warning sensor.battery_warning
Depth of discharge (on-grid) number.depth_of_discharge_on_grid
Diag Status sensor.diag_status
Diag Status Code sensor.diag_status_code
Effective Relay Control sensor.effective_relay_control
Effective Work Mode code sensor.effective_work_mode_code
Energy Mode sensor.energy_mode
Energy Mode code sensor.energy_mode_code
Error Codes sensor.error_codes
Grid export limit number.grid_export_limit
Hours Total sensor.hours_total
House Consumption sensor.house_consumption
Inverter operation mode select.inverter_operation_mode
Inverter Temperature sensor.inverter_temperature
Load Mode sensor.load_mode
Load Mode code sensor.load_mode_code
Meter Power Factor sensor.meter_power_factor
Meter Status code sensor.meter_status_code
On-grid Current sensor.on_grid_current
On-grid Export Power sensor.on_grid_export_power
On-grid Frequency sensor.on_grid_frequency
On-grid Mode sensor.on_grid_mode
On-grid Mode code sensor.on_grid_mode_code
On-grid Power sensor.on_grid_power
On-grid Voltage sensor.on_grid_voltage
Plant Power sensor.plant_power
PV Power sensor.pv_power
PV1 Current sensor.pv1_current
PV1 Mode sensor.pv1_mode
PV1 Mode code sensor.pv1_mode_code
PV1 Power sensor.pv1_power
PV1 Voltage sensor.pv1_voltage
PV2 Current sensor.pv2_current
PV2 Mode sensor.pv2_mode
PV2 Mode code sensor.pv2_mode_code
PV2 Power sensor.pv2_power
PV2 Voltage sensor.pv2_voltage
Synchronize inverter clock button.synchronize_inverter_clock
Today’s Load sensor.today_s_load
Today’s PV Generation sensor.today_s_pv_generation
Total Load sensor.total_load
Total Power sensor.total_power
Total PV Generation sensor.total_pv_generation
Work Mode sensor.work_mode
Work Mode code sensor.work_mode_code

I have created a card that shows basically what I want - all are ‘right now’:

  • PV Power - what the panels are generating
  • Battery Mode - Charing or discharging
  • Battery Power - power bring delivered by the battery (-ve if the battery is charging)
  • Battery State of Charge - battery percentage
  • House Consumption - the wattage used by the house
  • On Grid Export Power - Power to and from the grid
  • On-grid Mode - Importing, Idle or Exporting

Now getting back to the original question: How do I get these values to be displayed in the graphic ‘Energy distribution’ card?

Susan

1 Like

I am glad it isn’t in fact 621 :slight_smile:

Ignore losses/inefficiencies for a moment. And ignore the fact that energy cannot be created or destroyed, only converted from one form to another.

To be in the energy dashboard, an entity has to sense energy, not power. They are often confused.

Power is the rate of consumption or production of energy. It is measured in kW (kilowatts). If a 250v heater draws 4A of current, it produces 1000W or one kW.

Energy is calculated from that. A 1kW heater that runs for an hour consumes 1 kWh (one kilowatt hour). If it runs all day and night it consumes 24 kWh.

In mathematical terms power is the differential of energy with respect to time. Energy is the integral of power over time. Think of power as analogous to speed, and energy as analogous to distance travelled.

All of your sensors seem to be power, not energy. Fortunately home assistant has a helper to integrate (among other things) power to energy. Integration - Riemann sum integral - Home Assistant

TL:DR - you can only add energy entities to the energy dashboard, use the helper to create those energy entities from your power entities.

If you want to display current (instantaneous) power consumption figures I recommend something like the Sankey Chart card in HACS.

If you set it up with sensors of your various instantaneous power consumption values it will give a great look.

Credit to @tom_l for posting this elsewhere that got my attention.

1 Like

That is very cool!

@nickrout - I am certainly well awaer of the difference between ‘energy’ and ‘power’ (and I’m sure my university would withdraw my Master of Engineering (Electrical) if I didn’t!!!).
However, my ‘excuse’ is that I did a ‘cut and paste and edit’ of the entities for the GoodWe device and then used the same language to be consistent.
In the card that I created for these values the ‘units’ are all ‘W’ (Watts) even through the items have ‘Power’ in them.

Now to the real question: how do I edit the ‘Energy Dashboard’? In the ‘Overview’ dashboard I can see the ‘three dots’ that let me edit the dashboard and the individual cards. However I can’t see anything similar for the ‘Energy’ dashboard - is there some other means of editing it?

@sparkydave - You have opened up a new area for me to learn - HACS and then how to use the Sankey Chart. AS I said at the start, I’m really not sure about how these things get configured but I’m learning thanks to the jelp of people here.
Susan

Sorry I certainly didn’t mean to be condescending, you’d be surprised at the number people who struggle with this. You certainly got further in your EE studies than me (which is why I am now a lawyer).

You edit in : in sidebar choose settings then dashboards. Its then listed.

@nickrout - my apologies if my reply came across that way. I certainly did not take your comment as ‘condescending’; only to point out the improper use of the work ‘power’ that was in the original entity list and the fact that I (wrongly) didn’t change that in my message. Thank you for the guidance.

I have now learned how to access the HACS, installed the Sankey Chart code and configured it (almost but that is for another question) how I want it. Thanks you @sparkydave.

Susan

As an aside, where/when did you do engineering? There was only one female in my class in 1980/81 in ChCh NZ.

Like you - Canterbury Uni but 75 to 77 and 79. My Masters Prof was the inimitable Richard Bates.

Right Hand Thread Bates :slight_smile: