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
178 stars 52 forks source link

battery discharge sensor #72

Closed amgstone closed 1 year ago

amgstone commented 1 year ago

Screenshot_2023-08-30-15-27-44-461_io homeassistant companion android

Is there an existing issue for this?

Current Behavior

I have a sensor in a 2 in 1 inverter that shows both charge and discharge. when I connected the sensor, it constantly shows that the battery is discharging, even when it is charging. during discharge it displays "-".

Expected behaviour

battery discharge sensor

Possible Solutions

I have a sensor in a 2 in 1 inverter that shows both charge and discharge. when I connected the sensor, it constantly shows that the battery is discharging, even when it is charging. during discharge it displays "-".

Mode

lite

Context / Reason

I have a sensor in a 2 in 1 inverter that shows both charge and discharge. when I connected the sensor, it constantly shows that the battery is discharging, even when it is charging. during discharge it displays "-".

slipx06 commented 1 year ago

HI. Please can you share your card configuration and a screenshot of the issue.

amgstone commented 1 year ago

type: custom:sunsynk-power-flow-card cardstyle: lite show_solar: true solar: mppts: 2 show_daily: true battery: energy: 18000 shutdown_soc: 10 show_daily: true max_power: 11000 load: show_daily: true grid: show_daily_buy: true entities: inverter_voltage_154: sensor.smg_ii_ac_voltage load_frequency_192: none inverter_current_164: smg output_effective_current inverter_power_175: sensor.smg_mains_power grid_power_169: sensor.smg_output_power battery_voltage_183: sensor.smg_ii_battery_average_voltage battery_soc_184: sensor.jk_bms_state_of_charge battery_power_190: sensor.smg_battery_average_power battery_current_191: sensor.smg_ii_battery_average_current grid_ct_power_172: sensor.smg_mains_power grid_connected_status_194: binary_sensor.energy_in_sensor inverter_status_59: sensor.sunsynk_overall_state pv1_power_186: sensor.smg_ii_pv_average_power pv2_power_187: sensor.smg_ii_2_pv_average_power pv1_voltage_109: sensor.smg_ii_pv_average_voltage pv1_current_110: sensor.smg_ii_pv_average_current pv2_voltage_111: sensor.smg_ii_2_pv_average_voltage pv2_current_112: sensor.smg_ii_2_pv_average_current day_pv_energy_108: sensor.soniachni_paneli day_battery_charge_70: sensor.bms0_charging_energy_today day_battery_discharge_71: sensor.bms0_discharging_energy_today day_load_energy_84: sensor.solar_plus_energy_minus_battery_sensor day_grid_import_76: sensor.spozhito_elektroenergiyi_za_sogodni

amgstone commented 1 year ago

discharge Screenshot_2023-08-30-16-45-50-870_io homeassistant companion android

amgstone commented 1 year ago

charge Screenshot_2023-08-30-16-48-54-002_io homeassistant companion android

slipx06 commented 1 year ago

The battery power will always be displayed as a positive number. Does the the dot move in the correct direction when charging and discharging? If not you can use the invert option

amgstone commented 1 year ago

IMG_20230830_172732 always shows a positive number

slipx06 commented 1 year ago

Yes that's correct. Please refer to the documentation https://slipx06.github.io/sunsynk-power-flow-card/configuration.html#battery

image

amgstone commented 1 year ago

Screenshot_2023-08-30-18-48-19-224_io homeassistant companion android

now it is charging, but the charging status visualizes that it is being discharged and increases the time until it is fully discharged

amgstone commented 1 year ago

when charging it should show "charging" status, am i misunderstanding something?

amgstone commented 1 year ago

Screenshot_2023-08-30-19-02-37-028_io homeassistant companion android I have -1.4 amps and -79 watts at a time on the battery. and it shows that I have 79 watts without "-".

slipx06 commented 1 year ago

The card will never show a negative number for battery power, regardless of what your sensor value is. If needed you can invert the battery power.

image

Try adding the invert_power attribute to your battery section

battery:
  energy: 18000
  shutdown_soc: 10
  show_daily: true
  max_power: 11000
  invert_power: true

I'm going to update the card to apply the same logic to the battery_current. i.e. only show the sensor value as positive.

amgstone commented 1 year ago

Screenshot_2023-08-30-20-25-05-528_io homeassistant companion android added, it works, but tomorrow I will see how it will work when the battery is charged from the sun

amgstone commented 1 year ago

also tell me where to enter what, I can't add an electric car to the input load

slipx06 commented 1 year ago

You can add an additional load to the essential side and enable in your config. Its all documented.

additional_loads: | Optional | 0 | Display additional loads on the essential side (0/1/2) -- | -- | -- | -- load1_name: | Optional |   | Set the display name for the essential load 1 load2_name: | Optional |   | Set the display name for the essential load 2 load1_icon: | Optional | none | Change the essential load 1 image using preset or any mdi icon e.g. mdi:ev-station Presets are: boiler, pump, aircon, oven load2_icon: | Optional | none | Change the essential load 2 image using preset or any mdi icon e.g. mdi:ev-station Presets are: boiler, pump, aircon, oven essential_load1: | Optional |   | Sensor that contains the power of your essential load 1 (W) -- | -- | -- | --
amgstone commented 1 year ago

thank you very much, everything works IMG_20230831_130617