Sunsynk + Home Assistant

that's what I thought but hoped you had a lazier method :ROFL:
Like so :) Ive learnt something new today. :ROFL:

Code:
- platform: template
  sensors:
    battery_power_multiplied:
      friendly_name: "Battery Multipled by -1"
      value_template: "{{ ((states.sensor.battery_power.state | float * -1 )) }}"
      unit_of_measurement: "W"
Then use "battery_power_multiplied" in your card instead
 
that's what I thought but hoped you had a lazier method :ROFL:
There is actually an issue open for this.
I proposed the same template sensor solution. Maybe you guys can post there to confirm it works so we can close it out
 
lols, your guess is as good as mine. Best bet i think is to create a template sensor that takes your current sensor value and multiplies by -1.

Then use this new sensor in the config for the card
We could build this logic into the card and expose as a configurable attribute i.e. invert_battery_power: yes/no which does a simple multiplication on the sensor.
 
@Slip , I'm using your card with a solarman integration, got a couple requests if you keen?

  1. Grid status - For solarman integration , they use the following:
    1. 0 - Off-Grid
    2. 1 - On-Grid
  2. Inverter Status - Stand-by, Self-checking, Normal, FAULT - Normal doesnt seem to reflect , not sure if its case sensitive?
  3. I'm messaging the other dev on solarman as in his inverter config there is noting for daily discharge/charge of the battery but there is in a different template. My request to you is could you possibly make the dailies toggable by section? ie: battery/Grid/Solar so they are independent?
  4. Auxillary, can it be toggled please? I want to see my essential and non-essential but that is only visible in the Full view which includes auxiliary.

Nice card, I was trying to make my own based off the Tesla one and a few other changes but your saves a ton of work. FYI, still not visible in HACS, I had to add the repo manually to HACS and then install.

1683367913199.png
 
New Release v1.2.0

NOTE: This release changes the card configuration. Please see the README

Updates:

  • Choose between two inverter images (modern or Sunsynk)
  • Colour options for all card objects
  • Supports inverted battery power i.e. -discharge, +charge

1683386757857.png
 
@Slip , I'm using your card with a solarman integration, got a couple requests if you keen?

  1. Grid status - For solarman integration , they use the following:
    1. 0 - Off-Grid
    2. 1 - On-Grid
  2. Inverter Status - Stand-by, Self-checking, Normal, FAULT - Normal doesnt seem to reflect , not sure if its case sensitive?
  3. I'm messaging the other dev on solarman as in his inverter config there is noting for daily discharge/charge of the battery but there is in a different template. My request to you is could you possibly make the dailies toggable by section? ie: battery/Grid/Solar so they are independent?
  4. Auxillary, can it be toggled please? I want to see my essential and non-essential but that is only visible in the Full view which includes auxiliary.

Nice card, I was trying to make my own based off the Tesla one and a few other changes but your saves a ton of work. FYI, still not visible in HACS, I had to add the repo manually to HACS and then install.

View attachment 1519925
Thanks for the feedback. The grid status already supports on/off, 1/0. So that should be working already?
For the inverter status it requires lowercase values; 0 || standby, 1 || selftest, 2 || normal || ok, 3 || alarm, 4 || fault. You might need a template sensor here
Will look into 3 and 4
 
Thanks for the feedback. The grid status already supports on/off, 1/0. So that should be working already?
For the inverter status it requires lowercase values; 0 || standby, 1 || selftest, 2 || normal || ok, 3 || alarm, 4 || fault. You might need a template sensor here
Will look into 3 and 4
Yeah I meant the text for the grid, they were doing their own conversions from the 0/1.

I was hoping to avoid templates but was busy giving it a go. Should be easy enough , just convert its output to your requirements.
 
Yeah I meant the text for the grid, they were doing their own conversions from the 0/1.

I was hoping to avoid templates but was busy giving it a go. Should be easy enough , just convert its output to your requirements.
I've just pushed changed to address 3 and 4 . I'll include in the next release the new option under load

1683390791566.png
 
I've just pushed changed to address 3 and 4 . I'll include in the next release the new option under load

View attachment 1520057
Thanks.

Any idea what's wrong with this template? Fine in the template debugger but the yaml has a fit about some comma that's missing.

YAML:
- platform: template
  sensor:
    sunsynkcard_gridstatus:
      friendly_name: "Gridstatus"
      state: >
      {% if is_state('sensor.solarman_grid_connected_status', 'On-Grid') %}
            1
          {% else %}
            0
          {% endif %}

This is the error shown

1683391110636.png
 
The alligments are out. Here is the correct code.

YAML:
sensor:
  - platform: template
    sensors:
      sunsynkcard_gridstatus:
          friendly_name: "Gridstatus"
          value_template: >
            {% if is_state('sensor.solarman_grid_connected_status', 'On-Grid') %}
              1
            {% else %}
              0
            % endif %}

Also it should be value_template and not state
 
Last edited:
I've just pushed changed to address 3 and 4 . I'll include in the next release the new option under load

View attachment 1520057
I think there's a bug. Mine still wants a show_daily on the outer and it corrupts the switches.

1683396371774.png

removing it gives a required validation

1683396405890.png

Sorry, fresh suggestion, can we maybe set the inverter status text? Currently its a colour coded dot with the word status.
 
Last edited:
I think there's a bug. Mine still wants a show_daily on the outer and it corrupts the switches.

View attachment 1520099

removing it gives a required validation

View attachment 1520101

Sorry, fresh suggestion, can we maybe set the inverter status text? Currently its a colour coded dot with the word status.
I’ll have a look. Did you clear your browser cache? I don’t have that check enabled in the new code. Try clearing the last 1 hour of browsing data and do a shift reload.
 
Top
Sign up to the MyBroadband newsletter
X