Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature may not be available in some browsers.
#Enable KNX
knx: !include include/knx.yaml
#Enable Modbus
modbus: !include include/modbus.yaml
#Templates
template: !include include/template.yaml
#Cover
cover: !include include/cover.yaml
#Sensoren
sensor: !include include/sensors.yaml
#Gruppen
group: !include include/group.yaml
- sensor:
- name: "Batterie Ladeleistung"
unit_of_measurement: "W"
state: >
{% set x = (((states('sensor.xxxxbatterie_leistungxxxx') | float(0))) %}
{{ ([0, x, 9999999]|sort)[1] | float(0) }}
- sensor:
- name: "Batterie Entladeleistung"
unit_of_measurement: "W"
state: >
{% set y = (((states('sensor.xxxxbatterie_leistungxxxx') | float(0))) * (-1)) %}
{{ ([0, y, 9999999]|sort)[1] | float(0) }}
jetzt sollte ich aus diesem sensor.battery_consumption_production_diff zwei Riemann erstellen, richtig?
Kannst du mal hier die Werte markieren die wirklich von der Integration kommen, und nicht von dir erzeugt sind, oder einfacher die von dir erzeugten raus löschen?das hier sind alle Sensoren aus dem Bereich:
Anhang anzeigen 7280
rest:
# Batterie
- resource: http://192.168.0.75:80/api/v2/latestdata
method: GET
headers:
User-Agent: Home Assistant
Content-Type: application/json
Auth-Token: 738011a8-849a-4bd5-941a-36b3f4366389
scan_interval: 30
timeout: 15
sensor:
# Aktuelle Stromproduktion
- name: solar_power_w
value_template: '{{ value_json["Production_W"] }}'
unit_of_measurement: W
device_class: power
# Aktueller Ladestand in %
- name: battery_soc
value_template: '{{ value_json["USOC"] }}'
unit_of_measurement: '%'
device_class: battery
# Aktueller Ladestand in Wh
- name: battery_soc_energy
value_template: '{{ (value_json["USOC"]|float / 100 * value_json["FullChargeCapacity"]|float)|round(0)|int }}'
unit_of_measurement: Wh
device_class: energy
# Hausverbrauch
- name: house_consumption
value_template: '{{ value_json["Consumption_W"] }}'
unit_of_measurement: W
device_class: power
# Kapazität der Batterie
- name: battery_capacity
value_template: '{{ value_json["FullChargeCapacity"] }}'
unit_of_measurement: Wh
device_class: energy
# Differenz Erzeugung minus Hausverbrauch = Überschuss
- name: battery_setpoint_w
value_template: '{{ value_json["SetPoint_W"] }}'
unit_of_measurement: W
device_class: power
# Batterieladung
- name: battery_consumption_production_diff
value_template: '{{ value_json["Pac_total_W"] }}'
unit_of_measurement: W
device_class: power
# Netzeinspeisung = Überschuss - Batterieladung
- name: battery_einspeisung_netz
value_template: '{{ (value_json["SetPoint_W"]|float - value_json["Pac_total_W"]|float ) }}'
unit_of_measurement: W
device_class: power
# Zeitstempel
- name: battery_timestamp
value_template: '{{ value_json["Timestamp"] }}'
template:
sensor:
#Sonnen-Batterie
#Stromerzeugung
- name: "batterie_solarproduktion_watt"
unique_id: "batterie_solarproduktion_watt"
unit_of_measurement: "W"
device_class: "power"
state: "{{ states('sensor.batterie_solar_aktuell') | float(0) }}"