Install Extension : HACS
views:
- type: custom:power-flow-card-plus
entities:
grid:
entity:
production: sensor.smart_meter_63a_wirkleistung
display_state: one_way
color_circle: true
solar:
entity: sensor.gesamt_solar_pv_leistung
battery:
entity:
consumption: sensor.solarnet_entladeleistung
production: sensor.solarnet_ladeleistung
state_of_charge: sensor.byd_battery_box_premium_hv_ladezustand
display_state: one_way
color_circle: true
home:
entity: sensor.hausverbrauch_berechnet
override_state: true
color_icon: true
watt_threshold: 10000
cards: []
title: Stromverbrauch
Homassistent Configuration Yaml configuration.yam , install addon Editor
# Loads default set of integrations. Do not remove.
default_config:
# Load frontend themes from the themes folder
frontend:
themes: !include_dir_merge_named themes
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
template:
- sensor:
- name: "Gesamt Solar PV Leistung"
unit_of_measurement: "W"
state_class: measurement
device_class: power
state: >
{% set pv1 = states('sensor.solarnet_pv_leistung') | float(0) %}
{% set pv2 = states('sensor.solarnet_pv_leistung_2') | float(0) %}
{{ pv1 + pv2 }}
- name: "Hausverbrauch berechnet"
unit_of_measurement: "W"
state_class: measurement
device_class: power
state: >
{% set pv = states('sensor.gesamt_solar_pv_leistung') | float(0) %}
{% set grid = states('sensor.smart_meter_63a_wirkleistung') | float(0) %}
{% set ladung = states('sensor.solarnet_ladeleistung') | float(0) %}
{{ pv + grid - ladung }}
- name: "Battery Power Charging"
unit_of_measurement: W
device_class: power
state: "{{ max(0, 0 - states('sensor.solarnet_entladeleistung') | float(default=0)) }}"
- name: "Battery Power Discharging"
unit_of_measurement: W
device_class: power
state: "{{ max(0, states('sensor.sensor.solarnet_entladeleistung') | float(default=0)) }}"
- name: "Power Photovoltaics"
unit_of_measurement: W
device_class: power
state: "{{ states('sensor.gesamt_solar_pv_leistung') | float(default=0) }}"
sensor:
- platform: integration
source: sensor.battery_power_charging
name: "Total Battery Energy Charged"
unique_id: 'myuuid_1234'
unit_prefix: k
method: left
- platform: integration
source: sensor.battery_power_discharging
name: "Total Battery Energy Discharged"
unique_id: 'myuuid_1235'
unit_prefix: k
method: left
- platform: integration
source: sensor.gesamt_solar_pv_leistung
name: "Total Photovoltaics Energy"
unique_id: 'myuuid_1236'
unit_prefix: k
method: left