Hilfe bei Home Assistant Fehler (BKW)

Gabriel7

New member
Hallo zusammen,
Ich habe mich hier im Forum angemeldet, da ich ein Problem mit meinem HO habe und nicht ganz so fit dabei bin und bitte euer Unterstützung brauche.
Ich habe mir ein Energy Dashboard erstellt, und meine Ersparniss wird errechnet.

Folgendes Bild, die 3 Fehler habe ich und meine Gesamtersparnis wird nicht mehr berechnet.

Anbei noch der Code:




YAML:
# 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: "Power Total"
        unique_id: power_total
        unit_of_measurement: W
        device_class: power
        state: >
          {{ states('sensor.shelly_pro_3_em_phase_a_active_power')|float(0) +
             states('sensor.shelly_pro_3_em_phase_b_active_power')|float(0) +
             states('sensor.shelly_pro_3_em_phase_c_active_power')|float(0) }}
        availability: >
          {{ [ states('sensor.shelly_pro_3_em_phase_a_active_power'),
                states('sensor.shelly_pro_3_em_phase_b_active_power'),
                states('sensor.shelly_pro_3_em_phase_c_active_power') ] | map('is_number') | min }}

      - name: "Power vom Netz (Watt)"
        unique_id: power_vom_netz
        unit_of_measurement: W
        device_class: power
        state: >
          {% if states('sensor.power_total') | float(0) >= 0 %}
              {{ states('sensor.power_total') | float(0) | round(3) }}
          {% else %}
              {{ (0.0) | round(3) }}
          {% endif %}
        availability: >
          {{ [ states('sensor.power_total') ] | map('is_number') | min }}

      - name: "Power ins Netz (Watt)"
        unique_id: power_ins_netz
        unit_of_measurement: W
        device_class: power
        state: >
          {% if states('sensor.power_total') | float(0) < 0 %}
              {{ (states('sensor.power_total') | float(0) * -1) | round(3) }}
          {% else %}
              {{ (0.0) | round(3) }}
          {% endif %}
        availability: >
          {{ [ states('sensor.power_total') ] | map('is_number') | min }}

switch:
  - platform: mystrom
    name: mystrom_switch_1
    host: 192.168.178.66
  - platform: mystrom
    name: mystrom_switch_2
    host: 192.168.178.26

sensor:
  - platform: rest
    name: "mystrom_power_1"
    resource: http://192.168.178.66/report
    method: GET
    unit_of_measurement: W
    device_class: power
    state_class: measurement
    value_template: "{{ value_json.power }}"
  - platform: integration
    source: sensor.mystrom_power_1
    name: "mystrom Energy Consumption 1"
    unit_prefix: k
    round: 3
  - platform: rest
    name: "mystrom_power_2"
    resource: http://192.168.178.26/report
    method: GET
    unit_of_measurement: W
    device_class: power
    state_class: measurement
    value_template: "{{ value_json.power }}"
  - platform: integration
    source: sensor.mystrom_power_2
    name: "mystrom Energy Consumption 2"
    unit_prefix: k
    round: 3

  - platform: template
    sensors:
      solar_eigenverbrauch_watt:
        unique_id: solar_eigenverbrauch_watt
        unit_of_measurement: W
        device_class: power
        value_template: >
          {% if states('sensor.power_total') | float(0) < 0 %}
              {{ (states('sensor.power_total') | float(0) +
                   states('sensor.mystrom_device_leistung') | float(0) +
                   states('sensor.mystrom_haus_leistung') | float(0)) | round(3) }}
          {% else %}
              {{ (states('sensor.mystrom_device_leistung') | float(0) +
                   states('sensor.mystrom_haus_leistung') | float(0)) | round(3) }}
          {% endif %}
        availability_template: >
          {{ [ states('sensor.power_total'),
                states('sensor.mystrom_device_leistung'),
                states('sensor.mystrom_haus_leistung') ] | map('is_number') | min }}

      balkonsolar_vorteil:
        unique_id: balkonsolar_vorteil
        unit_of_measurement: EUR/h
        value_template: >
          {{ states('sensor.solar_eigenverbrauch_watt')|float(0) *
             states('input_number.strompreis')|float(0) / 1000 }}
 

Anhänge

  • IMG_8305.png
    IMG_8305.png
    218,7 KB · Aufrufe: 4
Zuletzt bearbeitet:
Hallo @Gabriel7,

ging das die ganze Zeit?
Dann hängt das vermutlich mit dem neuen Core-Update zusammen.
https://www.home-assistant.io/blog/2024/10/02/release-202410/#improved-yaml-syntax-for-automations

Es haben sich viele Schreibweisen geändert...
1728362339633.png

Überprüfe mal Deine *.yaml dahingehend...., ob da eine Änderung mit anhängen von einem "s" plural was bringt...

Ist nur eine Vermutung von mir.
Vermutlich sind noch andere Verursacher darin versteckt.
Aber die Profis melden sich noch dazu...

Von Dir alt..
YAML:
template:
  - sensor:
      - name: "Power Total"
        unique_id: power_total
        unit_of_measurement: W
        device_class: power
        state: >

Von mir neu....
YAML:
template:
  - sensors:
      - name: "Power Total"
        unique_id: power_total
        unit_of_measurement: W
        device_class: power
        state: >

Mach aber vorher ein Backup und sichere das weg...
Taste Dich langsam ran und mache immer vorher eine Validierung des Codes...
 
Zuletzt bearbeitet:

Zurzeit aktive Besucher

Letzte Anleitungen

Statistik des Forums

Themen
5.387
Beiträge
53.333
Mitglieder
5.175
Neuestes Mitglied
cctru
Zurück
Oben