Sunsynk + Home Assistant

I've added a new graph to the Dashboard based on the Deye Generation and Usage chart

1741718602110.png
 
v6.7.0

🚀 Exciting New Features

  • feat: added new inverter models for EASun, Ferroamp, Sigenergy and Linky closes #657, #579
  • feat: six essential loads can now be displayed on the card without the need for wide screen display mode if certain conditions are met i.e. mppt <=3 on lite card and !show_aux on full card etc closes #635
Compact6.png

Full6.png
Full Changelog: v6.6.9...v6.7.0
 
Last edited:
@Slip Thank you for all your effort!

Can you please share the code for your modified prepaid units?


entities:
- entity: sensor.prepaid_units_left
type: custom:bar-card
entity_row: true
severity:
- color: Red
from: 0
to: 40
- color: Orange
from: 41
to: 80
- color: null
from: 81
to: 300
- entity: input_number.prepaid_units
- entity: sensor.units_used_since_last_update
name: Units Used Since Last Update (kWh)
icon: mdi:flash
- entity: sensor.last_update_date
name: Last Update
icon: mdi:calendar
- entity: script.update_prepaid_units
 
@Slip

I have a couple non-essentials running off sonoffs or dedicated wifi breakers. They do not use the "sensor" prefix.

For example, to leverage a card for my geyser and see the power consumption, I use the below:

type: attribute
icon: mdi:non
name: Power
entity: switch.100223f4de
attribute: power

which leverages the attribute.

Any suggestions on how to add these as the non-essential load values? Maybe I need to create a fake sensor that just mirrors that attribute?
 
ah nvm, solved it with a template helper.

If anyone has the same sonoff/ewelink switches where the values are attrbutes:

Template forumula --> {{ state_attr('switch.100223f4de', 'power').split(' ')[0] | float }}

1744103826134.png

yes I'm lazy, did it via the GUI vs editing configuration.yaml.....
 
@Slip

I just can't seem to figure this out but have at times got it to work, but then the wrong thing was pumping the values.

Trying to add the additional loads but just don't get any output.


1744888601594.png

Oddly when I click on the icon for the geyser it takes me to the sensor, but when I click on the value it just does nothing which tells me something isn't linking up.

Would also be interested to know how to get the extra values you have showing on the Github page below in there for kWh and temperature as I could do away with some other screen entirely and just use yours. Found those extra values in the docs, seems they are code only and not in the GUI.



Code:
type: custom:sunsynk-power-flow-card
cardstyle: compact
show_solar: true
inverter:
  modern: true
  colour: black
  auto_scale: true
  model: sunsynk
  autarky: energy
battery:
  energy: 19200
  shutdown_soc: 15
  invert_power: false
  colour: red
  show_daily: true
  auto_scale: true
  show_remaining_energy: true
  dynamic_colour: true
  linear_gradient: true
  animate: false
  hide_soc: true
  show_absolute: false
solar:
  colour: orange
  show_daily: true
  mppts: 2
  auto_scale: true
  dynamic_colour: true
  display_mode: 2
  efficiency: 0
load:
  colour: green
  show_daily: true
  show_aux: false
  invert_aux: false
  dynamic_colour: true
  auto_scale: true
  dynamic_icon: true
  additional_loads: 3
  invert_flow: false
  invert_load: false
  load1_icon: mdi:water-boiler
  load1_switch: sensor.geyser_power
  load2_icon: mdi:dishwasher
  load2_switch: sensor.dishwasher_power
  load3_icon: mdi:tumble-dryer
  load3_switch: sensor.tumble_dryer_power
grid:
  colour: blue
  no_grid_colour: null
  show_daily_buy: true
  show_daily_sell: false
  show_nonessential: false
  auto_scale: true
entities:
  use_timer_248: switch.toggle_system_timer
  priority_load_243: switch.toggle_priority_load
  inverter_voltage_154: sensor.ss_inverter_voltage
  load_frequency_192: sensor.ss_inverter_frequency
  inverter_current_164: sensor.ss_inverter_current
  inverter_power_175: sensor.inverter_power
  grid_connected_status_194: binary_sensor.grid_online
  inverter_status_59: sensor.overall_state
  day_battery_charge_70: sensor.ss_day_battery_charge
  day_battery_discharge_71: sensor.ss_day_battery_discharge
  battery_voltage_183: sensor.battery_voltage
  battery_soc_184: sensor.battery_soc
  battery_power_190: sensor.battery_power
  battery_current_191: sensor.ss_battery_current
  grid_power_169: sensor.grid_inverter_load
  day_grid_import_76: sensor.ss_day_grid_import
  day_grid_export_77: sensor.ss_day_grid_export
  grid_ct_power_172: sensor.grid_power
  day_load_energy_84: sensor.ss_day_load_energy
  day_pv_energy_108: sensor.ss_day_pv_energy
  pv1_power_186: sensor.pv1_power
  pv1_voltage_109: sensor.ss_pv1_voltage
  pv1_current_110: sensor.ss_pv1_current
  pv2_voltage_111: sensor.ss_pv2_voltage
  pv2_current_112: sensor.ss_pv2_current
  battery_temp_182: sensor.battery_temperature
  radiator_temp_91: sensor.ss_radiator_temperature
  dc_transformer_temp_90: sensor.ss_dc_transformer_temperature
  pv2_power_187: sensor.ss_pv2_power
  total_pv_generation: sensor.total_pv_energy
  remaining_solar: sensor.energy_production_today_remaining
large_font: true
show_battery: true
show_grid: true
dynamic_line_width: true
wide: false

Okay this just wasn't all in one place where I thought it should be and figured it out now....this is what happens when you rely too much on the GUI instead of doing stuff by hand.

The entities I had populated with Power were literally the Switch entities which I'm guessing let's you turn these on and off with a press on the icon.

The actual load values according to the GUI are sitting in a completely separate section and populates essential_load1: whereas I was populating load1_switch: instead.

Correction below for anyone else struggling.

Code:
type: custom:sunsynk-power-flow-card
cardstyle: compact
show_solar: true
inverter:
  modern: true
  colour: black
  auto_scale: true
  model: sunsynk
  autarky: energy
battery:
  energy: 19200
  shutdown_soc: 15
  invert_power: false
  colour: red
  show_daily: true
  auto_scale: true
  show_remaining_energy: true
  dynamic_colour: true
  linear_gradient: true
  animate: false
  hide_soc: true
  show_absolute: false
solar:
  colour: orange
  show_daily: true
  mppts: 2
  auto_scale: true
  dynamic_colour: true
  display_mode: 2
  efficiency: 0
load:
  colour: green
  show_daily: true
  show_aux: false
  invert_aux: false
  dynamic_colour: true
  auto_scale: true
  dynamic_icon: true
  additional_loads: 3
  invert_flow: false
  invert_load: false
  load1_icon: mdi:water-boiler
  load1_switch: switch.geyser
  essential_load1: sensor.geyser_temperature
  essential_load1_extra: sensor.geyser_energy
  load2_icon: mdi:dishwasher
  load2_switch: switch.dishwasher_socket
  load3_icon: mdi:tumble-dryer
  load3_switch: switch.tumble_dryer_socket
grid:
  colour: blue
  no_grid_colour: null
  show_daily_buy: true
  show_daily_sell: false
  show_nonessential: false
  auto_scale: true
entities:
  use_timer_248: switch.toggle_system_timer
  priority_load_243: switch.toggle_priority_load
  inverter_voltage_154: sensor.ss_inverter_voltage
  load_frequency_192: sensor.ss_inverter_frequency
  inverter_current_164: sensor.ss_inverter_current
  inverter_power_175: sensor.inverter_power
  grid_connected_status_194: binary_sensor.grid_online
  inverter_status_59: sensor.overall_state
  day_battery_charge_70: sensor.ss_day_battery_charge
  day_battery_discharge_71: sensor.ss_day_battery_discharge
  battery_voltage_183: sensor.battery_voltage
  battery_soc_184: sensor.battery_soc
  battery_power_190: sensor.battery_power
  battery_current_191: sensor.ss_battery_current
  grid_power_169: sensor.grid_inverter_load
  day_grid_import_76: sensor.ss_day_grid_import
  day_grid_export_77: sensor.ss_day_grid_export
  grid_ct_power_172: sensor.grid_power
  day_load_energy_84: sensor.ss_day_load_energy
  day_pv_energy_108: sensor.ss_day_pv_energy
  pv1_power_186: sensor.pv1_power
  pv1_voltage_109: sensor.ss_pv1_voltage
  pv1_current_110: sensor.ss_pv1_current
  pv2_voltage_111: sensor.ss_pv2_voltage
  pv2_current_112: sensor.ss_pv2_current
  battery_temp_182: sensor.battery_temperature
  radiator_temp_91: sensor.ss_radiator_temperature
  dc_transformer_temp_90: sensor.ss_dc_transformer_temperature
  pv2_power_187: sensor.ss_pv2_power
  total_pv_generation: sensor.total_pv_energy
  remaining_solar: sensor.energy_production_today_remaining
  essential_load1: sensor.geyser_power
  essential_load1_extra: sensor.geyser_temperature
  essential_load2: sensor.dishwasher_power
  essential_load3: sensor.tumble_dryer_power
large_font: true
show_battery: true
show_grid: true
dynamic_line_width: true
wide: false
413658303-1cd5508d-33a0-4df9-9665-5a4d9e753178.png
 

Attachments

  • 1744888816237.png
    1744888816237.png
    96.2 KB · Views: 20
Last edited:
@Slip

I just can't seem to figure this out but have at times got it to work, but then the wrong thing was pumping the values.

Trying to add the additional loads but just don't get any output.

View attachment 1813751

Oddly when I click on the icon for the geyser it takes me to the sensor, but when I click on the value it just does nothing which tells me something isn't linking up.

Would also be interested to know how to get the extra values you have showing on the Github page below in there for kWh and temperature as I could do away with some other screen entirely and just use yours.

View attachment 1813756

Code:
- type: custom:sunsynk-power-flow-card
cardstyle: compact
panel_mode: false
show_solar: true
inverter:
modern: true
colour: black
auto_scale: true
model: sunsynk
autarky: energy
battery:
energy: 19200
shutdown_soc: 15
invert_power: false
colour: red
show_daily: true
auto_scale: true
show_remaining_energy: true
dynamic_colour: true
linear_gradient: true
animate: false
hide_soc: true
show_absolute: false
solar:
colour: orange
show_daily: true
mppts: 2
auto_scale: true
dynamic_colour: true
display_mode: 2
efficiency: 0
load:
colour: green
show_daily: true
show_aux: false
invert_aux: false
dynamic_colour: true
auto_scale: true
dynamic_icon: true
additional_loads: 3
invert_flow: false
invert_load: false
load1_icon: mdi:water-boiler
load1_switch: sensor.geyser_power
load2_icon: mdi:dishwasher
load2_switch: sensor.dishwasher_power
load3_icon: mdi:tumble-dryer
load3_switch: sensor.tumble_dryer_power
grid:
colour: blue
no_grid_colour: null
show_daily_buy: true
show_daily_sell: false
show_nonessential: false
auto_scale: true
entities:
use_timer_248: switch.toggle_system_timer
priority_load_243: switch.toggle_priority_load
inverter_voltage_154: sensor.ss_inverter_voltage
load_frequency_192: sensor.ss_inverter_frequency
inverter_current_164: sensor.ss_inverter_current
inverter_power_175: sensor.inverter_power
grid_connected_status_194: binary_sensor.grid_online
inverter_status_59: sensor.overall_state
day_battery_charge_70: sensor.ss_day_battery_charge
day_battery_discharge_71: sensor.ss_day_battery_discharge
battery_voltage_183: sensor.battery_voltage
battery_soc_184: sensor.battery_soc
battery_power_190: sensor.battery_power
battery_current_191: sensor.ss_battery_current
grid_power_169: sensor.grid_inverter_load
day_grid_import_76: sensor.ss_day_grid_import
day_grid_export_77: sensor.ss_day_grid_export
grid_ct_power_172: sensor.grid_power
day_load_energy_84: sensor.ss_day_load_energy
day_pv_energy_108: sensor.ss_day_pv_energy
pv1_power_186: sensor.pv1_power
pv1_voltage_109: sensor.ss_pv1_voltage
pv1_current_110: sensor.ss_pv1_current
pv2_voltage_111: sensor.ss_pv2_voltage
pv2_current_112: sensor.ss_pv2_current
battery_temp_182: sensor.battery_temperature
radiator_temp_91: sensor.ss_radiator_temperature
dc_transformer_temp_90: sensor.ss_dc_transformer_temperature
pv2_power_187: sensor.ss_pv2_power
total_pv_generation: sensor.total_pv_energy
remaining_solar: sensor.energy_production_today_remaining
large_font: true
show_battery: true
show_grid: true
dynamic_line_width: true
wide: false

I don't have non-essentials so almost feel like that could be causing a problem.
413658303-1cd5508d-33a0-4df9-9665-5a4d9e753178.png
Is it not perhaps due to the compact card style?
 
Is it not perhaps due to the compact card style?

Was my first through as well, but these list on the compact style on the Github page too and don't show in either Lite or Full either.

Well they show, they just don't pass that live data.
 
I have the same. I just left it, did not dig deeper.

So I was adding my Power sensor to the Switch entitles because the GUI made it seem logical.

Only after reading properly did I realise the power sensor is somewhere else altogether.

Updated my post with the correct stuff.

It all lives under load: in the code, but the GUI configuration splits it out. It's also called essential in one place but not the other.

Code:
load:
  colour: green
  show_daily: true
  show_aux: false
  invert_aux: false
  dynamic_colour: true
  auto_scale: true
  dynamic_icon: true
  additional_loads: 3
  invert_flow: false
  invert_load: false
  load1_icon: mdi:water-boiler
  load1_switch: switch.geyser
  essential_load1: sensor.geyser_temperature
  essential_load1_extra: sensor.geyser_energy
  load2_icon: mdi:dishwasher
  load2_switch: switch.dishwasher_socket
  load3_icon: mdi:tumble-dryer
  load3_switch: switch.tumble_dryer_socket

So load1_icon, load1_switch and essential_load1 all refer to the same thing.

Can't use the Energy values as I use Home Assistant Energy dashboard to calculate my Daily totals instead of utility meter. **** knowns why you can't just access that data directly as a sensor.
 
Hi @SauRoNZA

Sensor's are all defined in the respective `entities` section. The "configurable" options which have evolved over time are meant to be defined the respective "Options" section. If you configure through the gui it will put everything in its correct section.

Your config is not entirely correct. Its only the switches that are defined in the load options The essential loads and and extra load info is created under the entities section

Code:
load:
  colour: green
  show_daily: true
  show_aux: false
  invert_aux: false
  dynamic_colour: true
  auto_scale: true
  dynamic_icon: true
  additional_loads: 3
  invert_flow: false
  invert_load: false
  load1_icon: mdi:water-boiler
  load1_switch: switch.geyser
  load2_icon: mdi:dishwasher
  load2_switch: switch.dishwasher_socket
  load3_icon: mdi:tumble-dryer
  load3_switch: switch.tumble_dryer_socket

Highlighted the different sections in the gui

1744915121277.png

1744915570062.png

If you prefer to use the code editor the documentation has examples that can help guide you. They have not been updated with some of the newer options

 
Hi @SauRoNZA

Sensor's are all defined in the respective `entities` section. The "configurable" options which have evolved over time are meant to be defined the respective "Options" section. If you configure through the gui it will put everything in its correct section.

Your config is not entirely correct. Its only the switches that are defined in the load options The essential loads and and extra load info is created under the entities section

Code:
load:
  colour: green
  show_daily: true
  show_aux: false
  invert_aux: false
  dynamic_colour: true
  auto_scale: true
  dynamic_icon: true
  additional_loads: 3
  invert_flow: false
  invert_load: false
  load1_icon: mdi:water-boiler
  load1_switch: switch.geyser
  load2_icon: mdi:dishwasher
  load2_switch: switch.dishwasher_socket
  load3_icon: mdi:tumble-dryer
  load3_switch: switch.tumble_dryer_socket

Highlighted the different sections in the gui

View attachment 1813900

If you prefer to use the code editor the documentation has examples that can help guide you. They have not been updated with some of the newer options


Yeah it’s the documentation that for me on the right track.

Weird, it works just fine under the load section and I swear the GUI put it there.
 
Yeah it’s the documentation that for me on the right track.

Weird, it works just fine under the load section and I swear the GUI put it there.
It will only work if defined under entities. :)
 
Hi Guys,
Trying to follow through the pages to add my batteries, is there any change in the near future where more than 2 batteries could be added?
 
Are you willing to share the yaml code for one of the dashboards? I found one but it uses Solarman entities/sensors and I am struggling to map it to the Solar Assistant entities/sensors.

Obviously my entity names will probably differ and there are some custom entities here (like for energy usage) which you'd have to create. I also haven't touched this in ages, so not sure if everything is still as it should be but seems to be working.

YAML:
type: custom:sunsynk-power-flow-card
cardstyle: lite
show_solar: true
battery:
  energy: 15960
  shutdown_soc: 20
  show_daily: true
  invert_power: true
  max_power: 7500
  auto_scale: false
  show_remaining_energy: true
  hide_soc: true
solar:
  show_daily: true
  mppts: 2
  max_power: 6500
  auto_scale: false
load:
  show_daily: true
  auto_scale: false
  dynamic_icon: false
  dynamic_colour: true
grid:
  show_daily_buy: true
  show_daily_sell: false
  show_nonessential: false
  auto_scale: false
entities:
  use_timer_248: switch.use_timer
  priority_load_243: none
  inverter_voltage_154: sensor.ac_output_voltage
  load_frequency_192: sensor.ac_output_frequency
  inverter_current_164: none
  inverter_power_175: sensor.load_power
  grid_connected_status_194: binary_sensor.inverter_grid_available
  inverter_status_59: none
  day_battery_charge_70: sensor.battery_energy_in
  day_battery_discharge_71: sensor.battery_energy_out
  battery_voltage_183: sensor.battery_voltage
  battery_soc_184: sensor.battery_state_of_charge
  battery_power_190: sensor.battery_power
  battery_current_191: sensor.battery_current
  battery_temp_182: sensor.battery_temperature
  grid_power_169: sensor.grid_power
  day_grid_import_76: sensor.grid_consumption_total_kwh_daily
  day_grid_export_77: sensor.grid_energy_out
  grid_ct_power_172: sensor.grid_power_ct
  day_load_energy_84: sensor.inverter_load_total_kwh_daily
  essential_power: sensor.load_power_essential
  nonessential_power: sensor.load_power_non_essential
  aux_power_166: none
  day_pv_energy_108: sensor.pv_total_kwh_daily
  pv1_power_186: sensor.pv_power_1
  pv2_power_187: sensor.pv_power_2
  pv1_voltage_109: sensor.pv_voltage_1
  pv1_current_110: sensor.pv_current_1
  pv2_voltage_111: sensor.pv_voltage_2
  pv2_current_112: sensor.pv_current_2
  pv_total: sensor.pv_power
  total_pv_generation: sensor.pv_total_kwh_daily
  remaining_solar: sensor.forecast_remaining_today
panel_mode: false
show_battery: true
show_grid: true
inverter:
  modern: true
  model: sunsynk
  autarky: "no"
large_font: false
 
Top
Sign up to the MyBroadband newsletter
X