Sunsynk + Home Assistant

@Slip how can I make it bigger? I'd love for it to consume an entire panel all by itself as a quick view of what's going on.
He has the setting panel=yes and then you set the dashboard to be a panel view.

It's too large for me though, cuts off.
 
He has the setting panel=yes and then you set the dashboard to be a panel view.

It's too large for me though, cuts off.
Aaah missed that, thanks.

****

Weird still remains the same size, let me go fiddle.

Aaah had to go change my View Type on the panel itself.
 
Certainly.

I only used L1 as L2 returned zero consistently.

Python:
from sunsynk import AMPS, CELSIUS, KWH, VOLT, WATT
from sunsynk.rwsensors import NumberRWSensor, SelectRWSensor, TimeRWSensor
from sunsynk.sensors import (
    MathSensor,
    Sensor,
    SensorDefinitions,
    TempSensor,
)

SENSORS = SensorDefinitions()

SENSORS += Sensor(164, "Inverter Current", AMPS, -1)


As had a quick go at it... here is how I did it and comparing it to the screen on the inverter, seems to be spot on.

Python:
from sunsynk import AMPS, CELSIUS, KWH, VOLT, WATT
from sunsynk.rwsensors import NumberRWSensor, SelectRWSensor, TimeRWSensor
from sunsynk.sensors import (
    MathSensor,
    Sensor,
    SensorDefinitions,
    TempSensor,
)

SENSORS = SensorDefinitions()

SENSORS += (
    SelectRWSensor(248, "Use timer", options={255: "On", 254: "Off"}),
    MathSensor((164, 165), "Inverter current", AMPS, factors=(0.01, 0.01)),
)

Just added my sensor as "- inverter_current:now" to compare real time update. Seems to be more accurate that my template shared earlier.
 
As had a quick go at it... here is how I did it and comparing it to the screen on the inverter, seems to be spot on.

Python:
from sunsynk import AMPS, CELSIUS, KWH, VOLT, WATT
from sunsynk.rwsensors import NumberRWSensor, SelectRWSensor, TimeRWSensor
from sunsynk.sensors import (
    MathSensor,
    Sensor,
    SensorDefinitions,
    TempSensor,
)

SENSORS = SensorDefinitions()

SENSORS += (
    SelectRWSensor(248, "Use timer", options={255: "On", 254: "Off"}),
    MathSensor((164, 165), "Inverter current", AMPS, factors=(0.01, 0.01)),
)

Just added my sensor as "- inverter_current:now" to compare real time update. Seems to be more accurate that my template shared earlier.
Ah thats awesome.

Yeah will rather use that.

What does the ":now" do?
 
Yeah setting both to Panel just makes it vertically too big.

Setting Panel Off and then setting it to Panel on the tab itself centres it nicely but it's still quite small.
 
Ah thats awesome.

Yeah will rather use that.

What does the ":now" do?

Best to have a look here, https://kellerza.github.io/sunsynk/reference/sensor-modifiers

PS: if you want to user the timer, it creates a select sensor which needs to convert it to switch, used a templete sensor.

YAML:
switch:
  - platform: template
    switches:
      use_timer:
        friendly_name: "Inverter timer"
        value_template: "{{ is_state('select.ss_use_timer', 'On') }}"
        turn_on:
          service: select.select_option
          target:
            entity_id: select.ss_use_timer
          data:
            option: 'On'
        turn_off:
          service: select.select_option
          target:
            entity_id: select.ss_use_timer
          data:
            option: 'Off'
        icon_template: >-
          {% if is_state('select.ss_use_timer', 'On') %}
            mdi:timer-outline
          {% else %}
            mdi:timer-off-outline
          {% endif %}
 
Yeah setting both to Panel just makes it vertically too big.

Setting Panel Off and then setting it to Panel on the tab itself centres it nicely but it's still quite small.
Have a look at the grid panel, https://github.com/thomasloven/lovelace-layout-card. I used almost everywhere and creates columns that you can set.

here is from a test dashboard, where I test cards.

1684139920033.png

1684139953221.png

Then on each card you just need to add
YAML:
view_layout:
  grid-area: c1
Just change "c1" to where you would like it to be

You can also do something like this

YAML:
gridrows: auto
grid-template-columns: 5% 30% 30% 30% 5%
grid-template-areas: |
  "c1 c2 c3 c4 c5"
  "c6 c7 c8 c9 c10"

or

YAML:
gridrows: auto
grid-template-columns: 5% 30% 30% 30% 5%
grid-template-areas: |
  "c1 c2 c3 c3 c4"
  "c5 c6 c3 c3 c7"

1684141279536.png
 
Last edited:
Have a look at the grid panel, https://github.com/thomasloven/lovelace-layout-card. I used almost everywhere and creates columns that you can set.

here is from a test dashboard, where I test cards.

View attachment 1524247

View attachment 1524249

Then on each card you just need to add
YAML:
view_layout:
grid-area: c1
Just change "c1" to where you would like it to be

You can also do something like this

YAML:
gridrows: auto
grid-template-columns: 5% 30% 30% 30% 5%
grid-template-areas: |
"c1 c2 c3 c4 c5"
"c6 c7 c8 c9 c10"

or

YAML:
gridrows: auto
grid-template-columns: 5% 30% 30% 30% 5%
grid-template-areas: |
"c1 c2 c3 c3 c4"
"c5 c6 c3 c3 c7"

View attachment 1524259

Thanks.

I actually had the Grid layout card already installed but could never figure out how it actually works but the sub-panel data there told me all I need to know.

I actually generally just use Grid cards within Grid cards to achieve much the same right in the dash.
 
Thanks.

I actually had the Grid layout card already installed but could never figure out how it actually works but the sub-panel data there told me all I need to know.

I actually generally just use Grid cards within Grid cards to achieve much the same right in the dash.
I think you might be able to do something simlar with grid cards, just haven't done it.

Also look at @Slip own dashboard, https://github.com/slipx06/Sunsynk-Home-Assistant-Dash/tree/main got most of mine from here.
 
Can I be a pain and say let us be able to remove the "gridlines" in the battery box? I'd rather they float like the other figures personally.
I can have a look at that. Keen to hear if there is any other feedback around this?
 
Yeah setting both to Panel just makes it vertically too big.

Setting Panel Off and then setting it to Panel on the tab itself centres it nicely but it's still quite small.
Yes, not sure why it does that. You need to change the view type to Grid and create a layout that works.
 
Hmmm, what if you shifted the SOC out of the "box" to a larger bolder font like the Daily Stuff under the battery? Not sure what others thoughts are on that? TBH I have a gauge under mine to highlight the SOC.

View attachment 1524207

View attachment 1524209
There isn't much space to play with. For me the SOC and Battery Power are the two important numbers. I played with some options but settled on the grid

1684151417561.png 1684151438008.png
1684151451519.png
 
Top
Sign up to the MyBroadband newsletter
X