Closed mdoliver closed 2 years ago
The card expects the flows it gets fed to be independent from each other. You are using the same sensors everywhere. You need to divide those sensors and use them as sensor templates. My configuration:
type: custom:tesla-style-solar-power-card
name: Powercard
generation_icon: mdi:solar-power
grid_entity: sensor.grid_consumption
house_entity: sensor.house_consumption
battery_entity: sensor.battery_consumption
generation_entity: sensor.solar_yield
battery_to_house_entity: sensor.battery_consumption
generation_to_house_entity: sensor.solar_consumption
generation_to_grid_entity: sensor.grid_feed_in
generation_to_battery_entity: sensor.battery_charging
grid_to_house_entity: sensor.grid_consumption
battery_extra_entity: sensor.battery_charge
appliance1_consumption_entity: sensor.marvin_current_charging
appliance1_extra_entity: sensor.marvin_battery_sensor
appliance2_consumption_entity: sensor.heating_power_hour_s0
appliance2_extra_entity: sensor.heating_operation
change_house_bubble_color_with_flow: 1
hide_inactive_lines: 1
My flow templates:
- platform: template
sensors:
solar_yield:
value_template: '{{ ((states.sensor.solarsensors.attributes["power_dc1"] | int + states.sensor.solarsensors.attributes["power_dc2"] | int)) }}'
device_class: power
unit_of_measurement: W
battery_charge:
value_template: '{{ states.sensor.solarsensors.attributes["act_state_of_charge"] }}'
unit_of_measurement: '%'
battery_consumption:
value_template: '{% set batter_cons = states.sensor.solarsensors.attributes["total_dc_power"] - states.sensor.solarsensors.attributes["power_dc1"] - states.sensor.solarsensors.attributes["power_dc2"] | int %}
{% if batter_cons > 0 %}
{{ batter_cons | int }}
{% else %}
0
{% endif %}'
device_class: power
unit_of_measurement: W
battery_charging:
value_template: '{% set batter_cons = (states.sensor.solarsensors.attributes["total_dc_power"] - states.sensor.solarsensors.attributes["power_dc1"] - states.sensor.solarsensors.attributes["power_dc2"]) | int %}
{% if batter_cons < 0 %}
{{ (batter_cons * -1) | int }}
{% else %}
0
{% endif %}'
device_class: power
unit_of_measurement: W
grid_consumption:
value_template: '{{ states.sensor.solarsensors.attributes["home_own_consumption_from_grid"] | int }}'
device_class: power
unit_of_measurement: W
grid_feed_in:
value_template: '{% set feed_in = states.sensor.solarsensors.attributes["inverter_generation_power_actual"] | int - states.sensor.solarsensors.attributes["total_active_power_powermeter_home_consumption"] | int %}
{% if feed_in < 9000 and feed_in > 0 %}
{{ feed_in | int }}
{% else %}
0
{% endif %} '
device_class: power
unit_of_measurement: W
solar_consumption:
value_template: '{{ states.sensor.solarsensors.attributes["home_own_consumption_from_pv"] | int }}'
device_class: power
unit_of_measurement: W
house_consumption:
value_template: '{{ states.sensor.solarsensors.attributes["total_active_power_powermeter_home_consumption"] | int }}'
device_class: power
unit_of_measurement: W
house_energy:
value_template: "{% set phase1 = state_attr('sensor.solarsensors', 'active_power_phase_1_powermeter') %}
{% set phase2 = state_attr('sensor.solarsensors', 'active_power_phase_2_powermeter') %}
{% set phase3 = state_attr('sensor.solarsensors', 'active_power_phase_3_powermeter') %}
{{ (phase1 + phase2 + phase3) | int }}"
device_class: power
unit_of_measurement: W
Hi,
I'm trying to understand how the sum of flows work for certain bubbles (in my case the solar generation bubble). I have a setup which is working absolutely fine until excess power starts flowing back to the grid.
My issue: The amount of excess flow to the grid is being added back onto the solar generation bubble.
Flow as I understand it (see screenshot):
Here's my setup:
Any help would be greatly appreciated!