Open bsafh opened 2 weeks ago
This is the Sunsynk-Power-Flow-Card in another dashboard
I suspect that you replaced an entity name that broke the yaml parsing. Use an editor such as VSCode, perhaps it can show you the invalid yaml
Might have been that .. after an unintentional reboot of the HA VM, something does show up, but the layout is completely broken (I never worked with the custom:layout-card):
The first to cards from do not show up, it starts with number 4, and the first card is HUGE, but on the right side and half behind card 7 ....
and scaling the whole screen down ("Ctrl" + "-" on Win10, Firefox) leads to totally bizarre results:
How to fix this?
title: Solar
views:
- theme: Backend-selected
title: Deye
path: deye
subview: false
cards:
- type: custom:flex-horseshoe-card
card_height: 410px
view_layout:
grid-area: g2
entities:
- entity: sensor.wr_deye_1_battery_1_soc
decimals: 0
unit: '%'
name: BATTERY
- entity: sensor.wr_deye_1_battery_1_voltage
decimals: 2
unit: V
- entity: sensor.wr_deye_1_battery_1_current
decimals: 2
unit: A
- entity: sensor.wr_deye_1_battery_1_power
decimals: 0
unit: W
- entity: sensor.deye_1_day_battery_discharge
decimals: 2
unit: kWh
name: Discharge
- entity: sensor.deye_1_day_battery_charge
decimals: 2
unit: kWh
name: Charge
show:
horseshoe_style: autominmax
layout:
hlines:
- id: 0
xpos: 50
ypos: 40
length: 70
styles:
- opacity: 0.2;
- id: 0
xpos: 50
ypos: 60
length: 70
styles:
- opacity: 0.2;
vlines:
- id: 0
xpos: 50
ypos: 50
length: 18
styles:
- opacity: 0.2;
states:
- id: 0
entity_index: 0
xpos: 50
ypos: 33
styles:
- font-size: 3em;
- opacity: 0.9;
- id: 1
entity_index: 1
xpos: 44
ypos: 53
styles:
- font-size: 1.5em;
- text-anchor: end;
- id: 2
entity_index: 2
xpos: 55
ypos: 53
styles:
- text-anchor: start;
- font-size: 1.5em;
- id: 3
entity_index: 3
xpos: 34
ypos: 75
styles:
- text-anchor: start;
- font-size: 2em;
- id: 4
entity_index: 4
xpos: 76
ypos: 7
styles:
- text-anchor: start;
- font-size: 1.2em;
- id: 5
entity_index: 5
xpos: 0
ypos: 7
styles:
- text-anchor: start;
- font-size: 1.2em;
icons:
- id: 0
entity_index: 1
xpos: 30
ypos: 52
align: start
size: 1
names:
- id: 0
entity_index: 0
xpos: 50
ypos: 95
styles:
- font-size: 1.2em;
- id: 1
entity_index: 4
xpos: 81
ypos: 12
styles:
- font-size: 0.5em;
- text-anchor: start;
- id: 2
entity_index: 5
xpos: 0
ypos: 12
styles:
- font-size: 0.5em;
- text-anchor: start;
horseshoe_scale:
min: 0
max: 100
width: 6
color_stops:
'0': red
'2000': green
card_mod:
style: |
ha-card {
--ha-card-background: var(--card-background-color);
color: var(--primary-color);
}
- type: custom:flex-horseshoe-card
card_height: 410px
view_layout:
grid-area: g2
entities:
- entity: sensor.wr_deye_1_battery_1_soc
decimals: 0
unit: '%'
name: BATTERY
- entity: sensor.wr_deye_1_battery_1_voltage
decimals: 2
unit: V
- entity: sensor.wr_deye_1_battery_1_current
decimals: 2
unit: A
- entity: sensor.wr_deye_1_battery_1_power
decimals: 0
unit: W
- entity: sensor.deye_1_day_battery_discharge
decimals: 2
unit: kWh
name: Discharge
- entity: sensor.deye_1_day_battery_charge
decimals: 2
unit: kWh
name: Charge
show:
horseshoe_style: autominmax
layout:
hlines:
- id: 0
xpos: 50
ypos: 40
length: 70
styles:
- opacity: 0.2;
- id: 0
xpos: 50
ypos: 60
length: 70
styles:
- opacity: 0.2;
vlines:
- id: 0
xpos: 50
ypos: 50
length: 18
styles:
- opacity: 0.2;
states:
- id: 0
entity_index: 0
xpos: 50
ypos: 33
styles:
- font-size: 3em;
- opacity: 0.9;
- id: 1
entity_index: 1
xpos: 44
ypos: 53
styles:
- font-size: 1.5em;
- text-anchor: end;
- id: 2
entity_index: 2
xpos: 55
ypos: 53
styles:
- text-anchor: start;
- font-size: 1.5em;
- id: 3
entity_index: 3
xpos: 34
ypos: 75
styles:
- text-anchor: start;
- font-size: 2em;
- id: 4
entity_index: 4
xpos: 76
ypos: 7
styles:
- text-anchor: start;
- font-size: 1.2em;
- id: 5
entity_index: 5
xpos: 0
ypos: 7
styles:
- text-anchor: start;
- font-size: 1.2em;
icons:
- id: 0
entity_index: 1
xpos: 30
ypos: 52
align: start
size: 1
names:
- id: 0
entity_index: 0
xpos: 50
ypos: 95
styles:
- font-size: 1.2em;
- id: 1
entity_index: 4
xpos: 81
ypos: 12
styles:
- font-size: 0.5em;
- text-anchor: start;
- id: 2
entity_index: 5
xpos: 0
ypos: 12
styles:
- font-size: 0.5em;
- text-anchor: start;
horseshoe_scale:
min: 0
max: 100
width: 6
color_stops:
'0': red
'2000': green
card_mod:
style: |
ha-card {
--ha-card-background: var(--card-background-color);
color: var(--primary-color);
}
- type: custom:flex-horseshoe-card
view_layout:
grid-area: g1
entities:
- entity: sensor.wr_deye_1_pv_power
decimals: 0
unit: W
name: Solar
- entity: sensor.deye_1_pv1_power
decimals: 0
unit: W
name: Output
- entity: sensor.wr1_summary_day_pv1
decimals: 1
unit: kWh
name: Produced
- entity: sensor.deye_1_pv2_power
decimals: 0
unit: W
- entity: sensor.wr1_summary_day_pv2
decimals: 1
unit: kWh
layout:
hlines:
- id: 0
xpos: 50
ypos: 40
length: 70
styles:
- opacity: 0.2;
vlines:
- id: 0
xpos: 50
ypos: 59
length: 36
styles:
- opacity: 0.2;
states:
- id: 0
entity_index: 0
xpos: 50
ypos: 35
styles:
- font-size: 3em;
- opacity: 0.9;
- id: 1
entity_index: 1
xpos: 47
ypos: 53
styles:
- font-size: 1.5em;
- text-anchor: end;
- id: 2
entity_index: 2
xpos: 53
ypos: 53
styles:
- text-anchor: start;
- font-size: 1.5em;
- id: 3
entity_index: 3
xpos: 46
ypos: 63
styles:
- text-anchor: end;
- font-size: 1.5em;
- id: 4
entity_index: 4
xpos: 53
ypos: 63
styles:
- text-anchor: start;
- font-size: 1.5em;
- id: 5
entity_index: 5
xpos: 46
ypos: 73
styles:
- text-anchor: end;
- font-size: 1.5em;
- id: 6
entity_index: 6
xpos: 53
ypos: 73
styles:
- text-anchor: start;
- font-size: 1.5em;
- id: 7
entity_index: 8
xpos: 46
ypos: 83
styles:
- text-anchor: end;
- font-size: 1.5em;
- id: 8
entity_index: 9
xpos: 53
ypos: 83
styles:
- text-anchor: start;
- font-size: 1.5em;
- id: 9
entity_index: 7
xpos: 0
ypos: 7
styles:
- text-anchor: start;
- font-size: 1.2em;
icons:
- id: 0
entity_index: 1
xpos: 1
ypos: 53
align: start
size: 1
names:
- id: 0
entity_index: 0
xpos: 50
ypos: 95
styles:
- font-size: 1.2em;
- id: 1
entity_index: 1
xpos: 15
ypos: 45
styles:
- text-anchor: start;
- font-size: 0.5em;
- id: 2
entity_index: 2
xpos: 85
ypos: 45
styles:
- text-anchor: end;
- font-size: 0.5em;
- id: 3
entity_index: 7
xpos: 0
ypos: 12
styles:
- text-anchor: start;
- font-size: 0.5em;
horseshoe_scale:
min: 0
max: 110000
width: 3
color_stops:
'0': green
'1000': blue
'2500': orange
'4000': red
show:
horseshoe_style: colorstopgradient
card_mod:
style: |
ha-card {
--ha-card-background: var(--card-background-color);
color: var(--primary-color);
}
- type: custom:flex-horseshoe-card
entities:
- entity: sensor.deye_1_inverter_power
unit: W
name: AC
- entity: sensor.wr_deye_1_grid_l1_voltage
decimals: 0
unit: V
- entity: sensor.deye_1_grid_frequency
decimals: 2
unit: Hz
name: Grid
- entity: sensor.deye_1_grid_ct_power
decimals: 0
unit: W
name: Grid
- entity: sensor.deye_1_day_grid_import
decimals: 2
unit: kWh
name: Import
- entity: sensor.deye_1_day_load_energy
decimals: 2
unit: kWh
name: Daily
show:
horseshoe_style: autominmax
layout:
hlines:
- id: 0
xpos: 50
ypos: 40
length: 70
styles:
- opacity: 0.2;
- id: 0
xpos: 50
ypos: 60
length: 70
styles:
- opacity: 0.2;
vlines:
- id: 0
xpos: 50
ypos: 50
length: 18
styles:
- opacity: 0.2;
states:
- id: 0
entity_index: 0
xpos: 50
ypos: 33
styles:
- font-size: 3em;
- opacity: 0.9;
- id: 1
entity_index: 1
xpos: 44
ypos: 53
styles:
- font-size: 1.5em;
- text-anchor: end;
- id: 2
entity_index: 2
xpos: 55
ypos: 53
styles:
- text-anchor: start;
- font-size: 1.5em;
- id: 3
entity_index: 3
xpos: 42
ypos: 75
styles:
- text-anchor: start;
- font-size: 2em;
- id: 4
entity_index: 4
xpos: 75
ypos: 7
styles:
- text-anchor: start;
- font-size: 1.2em;
- id: 5
entity_index: 5
xpos: 0
ypos: 7
styles:
- text-anchor: start;
- font-size: 1.2em;
icons:
- id: 0
entity_index: 1
xpos: 30
ypos: 52
align: start
size: 1
names:
- id: 0
entity_index: 0
xpos: 50
ypos: 95
styles:
- font-size: 1.2em;
- id: 1
entity_index: 4
xpos: 85
ypos: 12
styles:
- font-size: 0.5em;
- text-anchor: start;
- id: 2
entity_index: 5
xpos: 0
ypos: 12
styles:
- font-size: 0.5em;
- text-anchor: start;
- id: 3
entity_index: 3
xpos: 44
ypos: 80
styles:
- font-size: 0.5em;
- text-anchor: start;
horseshoe_scale:
min: 0
max: 100000
width: 6
color_stops:
'0': '#5fb6ad'
'2000': '#5fb6ad'
card_mod:
style: |
ha-card {
--ha-card-background: var(--card-background-color);
color: var(--primary-color);
}
- type: custom:sunsynk-power-flow-card
cardstyle: full
show_solar: true
card_height: 410px
show_grid: true
solar:
display_mode: 2
colour: orange
show_daily: true
animation_speed: 6
max_power: 50000
auto_scale: true
mppts: 2
inverter:
modern: true
colour: grey
three_phase: true
auto_scale: true
autarky: energy
battery:
energy: 15000
shutdown_soc: 10
invert_power: false
colour: green
show_daily: true
animation_speed: 6
max_power: 10000
load:
colour: '#5fb6ad'
show_daily: true
show_aux: true
animation_speed: 4
max_power: 80000
grid:
colour: '#5490c2'
show_daily_buy: true
show_daily_sell: false
no_grid_colour: red
show_nonessential: false
animation_speed: 9
max_power: 30000
entities:
use_timer_248: switch.deye_1_use_timer
priority_load_243: switch.deye_1_priority_load
day_battery_charge_70: sensor.deye_1_day_battery_charge
day_battery_discharge_71: sensor.deye_1_day_battery_discharge
day_load_energy_84: sensor.deye_1_day_load_energy
day_grid_import_76: sensor.deye_1_day_grid_import
day_grid_export_77: sensor.deye_1_day_grid_export
day_pv_energy_108: sensor.deye_1_day_pv_energy
inverter_voltage_154: sensor.wr_deye_1_inverter_voltage
load_frequency_192: sensor.wr_deye_1_inverter_frequency
inverter_power_175: sensor.deye_1_inverter_power
grid_power_169: sensor.deye_1_grid_power
radiator_temp_91: sensor.wr_deye_1_radiator_temperature
dc_transformer_temp_90: sensor.wr_deye_1_dc_transformer_temperature
pv1_power_186: sensor.deye_1_pv1_power
pv2_power_187: sensor.deye_1_pv2_power
battery_voltage_183: sensor.wr_deye_1_battery_1_voltage
battery_soc_184: sensor.wr_deye_1_battery_1_soc
battery_power_190: sensor.wr_deye_1_battery_1_power
battery_current_191: sensor.wr_deye_1_battery_1_current
battery_temp_182: sensor.wr_deye_1_battery_1_temperature
grid_ct_power_172: sensor.deye_1_grid_ct_power
pv1_voltage_109: sensor.deye_1_pv1_voltage
pv1_current_110: sensor.deye_1_pv1_current
pv2_voltage_111: sensor.deye_1_pv2_voltage
pv2_current_112: sensor.deye_1_pv2_current
grid_connected_status_194: binary_sensor.deye_1_grid_connected
inverter_status_59: binary_sensor.wr_deye_1_inv_relay_status
aux_power_166: sensor.wr_deye_1_gen_power
day_aux_energy: sensor.wr_deye_1_day_gen_energy
remaining_solar: sensor.pv_forecast_energy_remaining_dach_vorne
solar_sell_247: switch.wr_deye_1_solar_export
decimal_places: 2
show_battery: true
- type: custom:apexcharts-card
view_layout:
grid-area: stats
chart_type: donut
header:
show: true
title: Solar Power usage
show_states: true
colorize_states: true
apex_config:
chart:
toolbar:
show: false
autoSelected: zoom
dataLabels:
formatter: |
EVAL:function(value) {
return value.toFixed(0) + " %";
}
plotOptions:
pie:
donut:
labels:
show: true
total:
show: true
label: Total kWh
formatter: |
EVAL:function(w) {
return w.globals.seriesTotals.reduce((a, b) => {return (a + b)} , 0).toFixed(1) + " kWh"
}
stroke:
width: 1
curve: smooth
legend:
show: false
responsive:
- breakpoint: 800
options:
chart:
height: 360px
- breakpoint: 1300
options:
chart:
height: 265px
- breakpoint: 10000
options:
chart:
height: 363px
series:
- entity: sensor.deye_1_day_pv_energy
name: Self Consumption / PV Production
- entity: sensor.deye_1_day_battery_charge
name: Battery Charging
- entity: sensor.deye_1_day_grid_export
name: Sold to Grid
- type: custom:apexcharts-card
view_layout:
grid-area: stats1
chart_type: donut
header:
show: true
title: Consumption Today
show_states: true
colorize_states: true
apex_config:
chart:
toolbar:
show: false
autoSelected: zoom
plotOptions:
pie:
donut:
labels:
show: true
total:
show: true
label: Total kWh
formatter: |
EVAL:function(w) {
return w.globals.seriesTotals.reduce((a, b) => {return (a + b)} , 0).toFixed(1) + " kWh"
}
stroke:
width: 1
curve: smooth
legend:
show: false
responsive:
- breakpoint: 800
options:
chart:
height: 360px
- breakpoint: 1300
options:
chart:
height: 320px
- breakpoint: 10000
options:
chart:
height: 354px
series:
- entity: sensor.deye_1_day_pv_energy
name: Solar consumed
color: rgb(255, 155, 48)
- entity: sensor.deye_1_day_battery_discharge
name: Battery
color: rgb(151, 90, 182)
- entity: sensor.deye_1_day_grid_import
name: Grid
color: rgb(84, 144, 194)
- type: history-graph
entities:
- entity: sensor.wr_deye_1_load_power
- entity: sensor.deye_1_grid_power
- entity: sensor.wr_deye_1_pv_power
- entity: sensor.wr_deye_1_battery_1_power
- entity: sensor.deye_1_pv1_power
- entity: sensor.deye_1_pv2_power
hours_to_show: 12
- type: weather-forecast
entity: weather.dwd_uetze_e688_instanz_3_uetze_3
forecast_type: daily
visible:
- user: 52d2c1ee572240deb997ebd3e5173a6d
- user: 726dca442e764fbd98e216f638242af3
- user: aded4704d04b4bf3b0256e41c83dfd54
type: custom:grid-layout
type: custom:grid-layout
does show the described behavior.
changing this to type: custom:horizontal-layout
or Mansory does show all the cards ... so there must be some error in the layout definition (copied from JustGrabbingSomeIdeas ).
Execpt for one card, which shows up but is empty - another wrong layout definition?
type: custom:flex-horseshoe-card
view_layout:
grid-area: g1
show: always
entities:
- entity: sensor.wr_deye_1_pv_power
decimals: 0
unit: W
name: Solar
- entity: sensor.deye_1_pv1_power
decimals: 0
unit: W
name: Output
- entity: sensor.wr1_summary_day_pv1
decimals: 1
unit: kWh
name: Produced
- entity: sensor.deye_1_pv2_power
decimals: 0
unit: W
- entity: sensor.wr1_summary_day_pv2
decimals: 1
unit: kWh
layout:
hlines:
- id: 0
xpos: 50
ypos: 40
length: 70
styles:
- opacity: 0.2;
vlines:
- id: 0
xpos: 50
ypos: 59
length: 36
styles:
- opacity: 0.2;
states:
- id: 0
entity_index: 0
xpos: 50
ypos: 35
styles:
- font-size: 3em;
- opacity: 0.9;
- id: 1
entity_index: 1
xpos: 47
ypos: 53
styles:
- font-size: 1.5em;
- text-anchor: end;
- id: 2
entity_index: 2
xpos: 53
ypos: 53
styles:
- text-anchor: start;
- font-size: 1.5em;
- id: 3
entity_index: 3
xpos: 46
ypos: 63
styles:
- text-anchor: end;
- font-size: 1.5em;
- id: 4
entity_index: 4
xpos: 53
ypos: 63
styles:
- text-anchor: start;
- font-size: 1.5em;
- id: 5
entity_index: 5
xpos: 46
ypos: 73
styles:
- text-anchor: end;
- font-size: 1.5em;
- id: 6
entity_index: 6
xpos: 53
ypos: 73
styles:
- text-anchor: start;
- font-size: 1.5em;
- id: 7
entity_index: 8
xpos: 46
ypos: 83
styles:
- text-anchor: end;
- font-size: 1.5em;
- id: 8
entity_index: 9
xpos: 53
ypos: 83
styles:
- text-anchor: start;
- font-size: 1.5em;
- id: 9
entity_index: 7
xpos: 0
ypos: 7
styles:
- text-anchor: start;
- font-size: 1.2em;
icons:
- id: 0
entity_index: 1
xpos: 1
ypos: 53
align: start
size: 1
names:
- id: 0
entity_index: 0
xpos: 50
ypos: 95
styles:
- font-size: 1.2em;
- id: 1
entity_index: 1
xpos: 15
ypos: 45
styles:
- text-anchor: start;
- font-size: 0.5em;
- id: 2
entity_index: 2
xpos: 85
ypos: 45
styles:
- text-anchor: end;
- font-size: 0.5em;
- id: 3
entity_index: 7
xpos: 0
ypos: 12
styles:
- text-anchor: start;
- font-size: 0.5em;
horseshoe_scale:
min: 0
max: 110000
width: 3
color_stops:
'0': green
'1000': blue
'2500': orange
'4000': red
show:
horseshoe_style: autominmax
card_mod:
style: |
ha-card {
--ha-card-background: var(--card-background-color);
color: var(--primary-color);
}
The default layout "Masonry" is assumed.
If you are customising the layout with a grid layout then you need to check for yaml in the display definitions that might conflict with your layout. Like the example below.
view_layout:
grid-area: g2
g2 might not be defined causing a failure to render
well, it's not me who defined the grid layout, that's a straight copy from JustGrabbingSomeIdeas and the YAML code for the dashboard over there ...
the empty card in https://github.com/tomatensaus/DeyeSolarDesktop/issues/5#issuecomment-2173177028 happens even in Mansonry layout
Yes agreed, there are some lost layout bits in the dashboard yaml definition that I never removed. They have never been reported as a problem. I just upgraded to the latest Home Assistant but my dashboard is not affected and still rendering even with those included.
Perhaps you need to refresh your browser cache or a HACs plugin is causing the display issues causing some conflict with the JS.
Lots of people installed the dashboard using the SmartDeyeDongle and there has been no complaints about dashboard rendering. If you find the root cause, perhaps I can improve the dashboard.
I had a user with another case like this. The dashboard would not render. Shift + F5 and then suddenly it renders. I have not installed the latests HACS updates and mine still renders fine.
I did login remotely and confirmed that my browser showed the same issue.
I believe somewhere one of the hacs display components is causing this. Perhaps look at the browser log for error messages?
Also saw other people struggling with the same issue https://community.home-assistant.io/t/lovelace-dashboard-not-loading-until-refresh/394876
Empty dashboard issue was resolved when the unknown entities were all fixed, strange indeed!
The default layout "Masonry" is assumed.
If you are customising the layout with a grid layout then you need to check for yaml in the display definitions that might conflict with your layout. Like the example below.
view_layout: grid-area: g2
g2 might not be defined causing a failure to render
Nope, it's ignored in horizontal or mansory layout, removing it does not help
Empty dashboard issue was resolved when the unknown entities were all fixed, strange indeed!
Nope, that does not help either.
I found the issue:
this particular flex-horseshoe-card
definies 5 entities
, but references entity_index
number 0 to 9 in the "states:
" section, i.e. many more entities than are actually defined.
The card shows up when either removing all references to non-existsting entity_index
numbers or adding a few more (existing) entities
.
So this particular card should be fixed in the template https://github.com/tomatensaus/DeyeSolarDesktop/blob/main/JustGrabbingSomeIdeas.md - as noone apart from the author can really guess whether there are entities
missing or whether there are to many states:
defined...
That sounds fixable and thank you for the feedback. One other person reported this missing dashboard but when all the entities matched with the system it renders without any issues.
If I understand you correctly the issue is on the "Solar" flex-horshoe-card right? Attached is a dashboard for reference. I will attempt to improve the yaml given the information you provided.
If I understand you correctly the issue is on the "Solar" flex-horshoe-card right?
correct, yes
thanks!
I just counted there are 10 entities on the card. The indexing starts 0 ... 9 , which means there is indexing for 10 items exactly. The dashboard was designed for 10 entities as some of the commercial inverters have 4 MPPTS and we report the total power generation per MPPT.
If you removed some of the entities on this card for your reporting then it would explain why there is a mismatch, but that would be specific to your setup and not something I could fix unfortunately.
The flex-horseshoe-card
probably needs some improvement because it is very bad at handling errors. Unfortunately the developer is not actively maintaining the code anymore
It is still insightful and thank you for providing feedback.
Hopefully this will help the next person that ends up on blank dashboard.
This is what the empty desktop looks like before any solar data is populated from the inverter.
No, it's totally blank. Nothing there.
Even after installing everything from JustGrabbingSomeIdeas and replacing the entities for most of the cards (names are different in my Installation, as I use the Sunsyk/Deye addon with modbus connection) incl. all entities for the Sunsynk-Power-Flow-Card the tab stays just blank.
The Sunsynk-Power-Flow-Card works finde in another dashboard, but herein not even this shows up.
No errors displayed, no messing entities, nothing.
On the other tabs All the messing entities do show, but not on the first tab.