slipx06 / sunsynk-power-flow-card

⚡A customizable Home Assistant card to emulate the Sunsynk System flow that's displayed on the Inverter screen.
MIT License
184 stars 53 forks source link

Order of PV strings in Lite Card #397

Closed pjv closed 5 months ago

pjv commented 5 months ago

Is there an existing issue for this?

Current Behavior

I see the boxes representing the PV strings in the order PV3, PV1, PV2.

SCR-20240422-glfk

Steps To Reproduce

No response

Expected behaviour

I think the order should be PV1, PV2, PV3

Card Version

4.32.0

Home Assistant Version

2024.4.3

Configuration

type: custom:sunsynk-power-flow-card
cardstyle: lite
show_solar: true
battery:
  energy: 0
  shutdown_soc: 50
  show_daily: true
solar:
  show_daily: true
  mppts: 3
  pv1_name: String 1
  pv2_name: String 2
  pv3_name: String 3
  auto_scale: true
load:
  show_daily: true
  auto_scale: true
grid:
  show_daily_buy: false
  show_daily_sell: false
  show_nonessential: true
entities:
  inverter_voltage_154: sensor.lxp_baXXXXX_grid_voltage
  load_frequency_192: sensor.lxp_baXXXXX_eps_frequency
  inverter_current_164: NONE
  inverter_power_175: sensor.lxp_baXXXXX_inverter_power
  grid_connected_status_194: NONE
  inverter_status_59: NONE
  day_battery_charge_70: sensor.lxp_baXXXXX_battery_charge_today
  day_battery_discharge_71: sensor.lxp_baXXXXX_battery_discharge_today
  battery_voltage_183: sensor.lxp_baXXXXX_battery_voltage
  battery_soc_184: sensor.lxp_baXXXXX_state_of_charge
  battery_power_190: sensor.lxp_baXXXXX_battery_power_discharge_is_negative
  battery_current_191: NONE
  grid_power_169: sensor.lxp_baXXXXX_grid_power_export_is_negative
  day_grid_import_76: sensor.lxp_baXXXXX_energy_from_grid_today
  day_grid_export_77: sensor.lxp_baXXXXX_energy_to_grid_today
  grid_ct_power_172: NONE
  day_load_energy_84: sensor.lxp_baXXXXX_energy_of_inverter_today
  essential_power: sensor.lxp_baXXXXX_inverter_power
  nonessential_power: NONE
  aux_power_166: NONE
  day_pv_energy_108: sensor.lxp_baXXXXX_pv_generation_today
  pv1_power_186: sensor.lxp_baXXXXX_pv_power_string_1
  pv2_power_187: sensor.lxp_baXXXXX_pv_power_string_2
  pv3_power_188: sensor.lxp_baXXXXX_pv_power_string_3
  pv1_voltage_109: sensor.lxp_baXXXXX_pv_voltage_string_1
  pv2_voltage_111: sensor.lxp_baXXXXX_pv_voltage_string_2
  pv3_voltage_113: sensor.lxp_baXXXXX_pv_voltage_string_3
  pv_total: sensor.lxp_baXXXXX_pv_power_array
  pv1_current_110: NONE
  pv2_current_112: NONE
  radiator_temp_91: sensor.lxp_baXXXXX_radiator_1_temperature
  dc_transformer_temp_90: sensor.lxp_baXXXXX_radiator_2_temperature
panel_mode: false
show_grid: true
inverter:
  three_phase: false
  auto_scale: false
  model: lux
  modern: true
  autarky: 'no'

Relevant log output

No response

pjv commented 5 months ago

Of course I can configure the entities out of order to fix this, but I just thought it would be more intuitive if the card visualization order matched the numeric order of the parameter labels.

slipx06 commented 5 months ago

Hi. Not really because if you only had one MPPT you would need to use the entity pv2_power_187 which is confusing and if you had 2 MPPT's you would need to use entities pv2_power_187 and pv3_power_188. Think of it as scaling outwards i.e.

1 12 312 3124

as opposed to

2 23 123 1234

There is no additional logic that checks if PV>2 and reorders the entities on the card.