Inverter Power Flow Card

v1.5.7

Updates

  • Add optional dynamic speed animations depending on power draw. PR#29. Thanks @Papsnoek. New attributes can be configured for battery, grid, load and solar. If not defined this is disabled and default speeds are used.
    • animation_speed: - Set slowest animation speed in seconds, depending on Power draw
    • max_power: - Maximum Power draw to calculate animation speed
  • Adds an optional attribute (invert_grid:) to invert grid power. See Readme.
1 Like

I use ESPHome , if you need it I can make a copy from the YAML file ???

BTW how do I figure out what sensor is use in this 3 “Boxes” image
the “DALY LOAD” value is my currnt flow of power right now.

Ben

These are the registers I read for the 8KW. You can look at my Github (WIKI) as each sensor has the register referenced in its name. Please share you ESPHome config

image

I am not allowed to attach a *.txt file so I made this download link…hope it works:

1 Like

Please rather attach this as a file and clean up that post. Thanks

I have now clean up my message no:64 and made a link for U

OK try these
grid_external_power_172: sun12k-Out-of-grid–total power
inverter_load_grid_169: sun12k_Total_Grid_Power
inverter_out_164: sun12k_Grid_Current_L1+sun12k_Grid_Current_L2+sun12k_Grid_Current_L3 (you need to create a template sensor to sum these 3)
essential_power: sun12k_Load_totalpower

ok…

**it is working !**grid_external_power_172: sensor.sun12k-Out-of-grid–total power

but the 2 other do not work

inverter_load_grid_169: sensor.sun12k_Total_Grid_Power
inverter_out_164: sensor.sun12k_Grid_Current_L1+sensor.sun12k_Grid_Current_L2+sensor.sun12k_Grid_Current_L3

cant see any funktion on this : essential_power: sensor.sun12k_Load_totalpower

on all sensor I have to add “sensor.” to the name…

here the flow-card:
image

You need to get the full entity ID for those sensors from the Developer tools. I just pulled those names from your ESPHome config. Just filter on the state names and then use the full entity ID shown.

LIke I said you need to create a template sensor that add those three sensors for inverter_out_164. Search the forums on how to do this

ok…I will try to figure it out.

I was just thinking if it was so easy as this

sensor.sun12k_Grid_Current_L1+sensor.sun12k_Grid_Current_L2+sensor.sun12k_Grid_Current_L3 / 3
so you do the /3 to divide the sum and get the total current…

but I wil try look arround…

thanks for you help :slight_smile:

Ben

add this to your ESPHome config

  - platform: template                   # Sum of Grid L1 L2 L3
    name: "sun12k-Grid Total Current"
    id: sun12k_Grid_Total_Current
    unit_of_measurement: "A"
    accuracy_decimals: 1
    state_class: measurement
    lambda: |-
      return (id(sun12k_Grid_Current_L1).state + id(sun12k_Grid_Current_L2).state + id(sun12k_Grid_Current_L3).state);
    update_interval: 5s

hi…
I add this line to my YAML file and the save and hit install get this error !!!

1./
INFO ESPHome 2023.5.5
INFO Reading configuration /config/esphome/deye12k.yaml…
ERROR Error while reading config: Invalid YAML syntax:

while scanning a block scalar
in “/config/esphome/deye12k.yaml”, line 1037, column 13:
lambda: |-return sensor.sun12k_Grid_Curr …
^
expected chomping or indentation indicators, but found ‘r’
in “/config/esphome/deye12k.yaml”, line 1037, column 15:
lambda: |-return sensor.sun12k_Grid_Curren …

2./

  • platform: modbus_controller

    modbus_controller_id: ${modbus_controller_id}

    name: “sun12k-Grid Total Current”

    id: sun12k_Grid_Total_Current

    unit_of_measurement: “A”

    accuracy_decimals: 1

    state_class: measurement

    lambda: |-return sensor.sun12k_Grid_Current_L1).state + sensor.sun12k_Grid_Current_L2).state + sensor.sun12k_Grid_Current_L3).state);

    update_interval: 5s

her a picture whit the line-numbers

image

@slipx06 can make or create second set of autarky/ratio against power values or make it option to use either energy or power values to calculate autarky/ratio

as you see below the first graph is using live power values

Paste it exactly as I shared. You need to fix your lambda line.

Interesting. Using the power values gives you a point in time view, but it might be better to see it change in real time.

SORRY i made a fault at the keyboard :wink: !!! but your code did the work, it was my big fat finger there made the error, so now it is working…now I just have to fix the last (red ring)

image

Ben

The template sensor you’ve just created will give you the current for the grey box

inverter_out_164: sensor. sun12k_Grid_Total_Current

v1.6.0
Updates
This release adds System Timer information to the battery display. (PR#36 Thanks @Papsnoek). The card accepts 18 (optional) additional sensors to read data for the six time slots (prog1 - prog6). For example prog1 sensors below:

|prog1_time:| Optional | select.ss_prog1_time | Program 1 start time (HH:MM)
|prog1_capacity:| Optional | number.ss_prog1_capacity | Program 1 capacity (SOC) setting
|prog1_charge:| Optional | select.ss_prog1_charge | Program 1 charge options (on/off, 0/1, No Grid or Gen)

The battery display will show the set time slot SOC capacity next to the current SOC and adjust the time to charge or discharge accordingly. There is an additional icon next to the Timer On /Timer Off text which indicates if grid charge is active/inactive for the current time slot.

1.6.1 - Toggle time slot grid charge on/off from within the card

sunsynk-power-flow-grid

v1.6.2

  • The Auxiliary load can be renamed using the optional aux_name: attribute under the Load section
  • The Non-essential load can be configured to display two additional sensor values i.e. Geyser/Car charger and supports renaming. The following new optional attributes have been added to the Grid Section:
    • nonessential_name: Set the display name for the Non-Essential Load
    • nonessential_dual: Toggle the display of two Non-Essential loads (yes/no)
    • load1_name: Set the display name for the Non-Essential Load 1
    • load2_name: Set the display name for the Non-Essential Load 2
  • The following entity sensors will be read to populate the two loads:
    • non_essential_load1: Sensor that contains the power of your non-essential load (W)
    • non_essential_load2: Sensor that contains the power of your non-essential load (W)