Home Assistant: Fensterstatus, Regenschutz, Einbruchwarnung für Camper/Haus (mit Floorplan)🚐

Willkommen zu unserem neuen Video! Erfahre, wie Home Assistant dein Zuhause, ob mobil oder nicht schützt, indem es offene Fenster oder Türen erkennt, und damit vor Regen warnt und Einbrüche verhindert! Entdecke auch unseren Camper-Floorplan und triff unseren spannenden Gast, der dir auch einen Einblick in seine Lösungen gibt. Verpasse nicht diese spannende Einführung in die Welt der Smart (mobil) Home-Sicherheit!

Ich möchte euch heute einen allgemeinen Amazon-Link teilen, über den ihr eine Vielzahl von Produkten entdecken könnt. Egal, ob ihr nach Smart Home-Geräten, Gadgets oder anderen nützlichen Artikeln sucht, Amazon hat für jeden etwas zu bieten.

Wenn ihr über diesen Link einkauft, unterstützt ihr meinen Kanal, ohne dass es für euch zusätzliche Kosten verursacht. Das hilft mir, weiterhin spannende Inhalte für euch zu erstellen!

Hier ist der Link zu Amazon: https://amzn.to/3KsGngK

Vielen Dank für eure Unterstützung!

In meinem Shop findest du auch die verwendeten Produkte * aus dem Video

Um Alarmo installieren zu können benötigst du HACS. Wie du HACS installierst, erfährst du in diesem Video:

YouTube player

Wie du Home Assistant auf deinem Raspberry PI 4 oder 5 für z.B. deinen Camper installieren kannst, zeige ich dir in diesem kurzen Video:

YouTube player

Den Kanal von Daniel (smarthomeyourself) findest du hier:

Das ausführliche Alarmo Tutorial von Daniel könnt ihr hier finden:

YouTube player

Vielen Dank auch an Maxx für sein tolles Berechnungstool und natürlich auch für seine Klasse Videos im Blick auf Dashboards und Flurplänen. Schaut bei ihm gerne mal vorbei:

Position auf der Picture Elements Card berechnen! Von Pixel auf % – Smart Home Bastler

Den Kanal von Maxx findest du hier: Kanal

Im Video zeige ich euch , wie ihr einen einfachen Flurplan erstellt. Egal ob Camper oder Haus. Hier habt ihr den Beispielcode (Bildelemente Karte) aus dem Video:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
type: picture-elements
elements:
- type: state-icon
entity: binary_sensor.fenster_hinten
style:
top: 43%
left: 4%
'--mdc-icon-size': 100%
color: transparent
- type: state-icon
entity: binary_sensor.fenster_hinten_rechts
style:
top: 85%
left: 21%
'--mdc-icon-size': 100%
color: transparent
- type: state-icon
entity: binary_sensor.fenster_mitte_rechts
style:
top: 85%
left: 48%
'--mdc-icon-size': 100%
color: transparent
- type: state-icon
entity: binary_sensor.fenster_vorne_rechts_unten
style:
top: 85%
left: 73%
'--mdc-icon-size': 100%
color: transparent
- type: state-icon
entity: binary_sensor.fenster_vorne_rechts_oben
style:
top: 85%
left: 78%
'--mdc-icon-size': 100%
color: transparent
- type: state-icon
entity: binary_sensor.fenster_hinten_links
style:
top: 10%
left: 21%
'--mdc-icon-size': 100%
background_colour: green
color: transparent
- type: state-icon
entity: binary_sensor.fenster_vorne_links
style:
top: 10%
left: 74%
'--mdc-icon-size': 100%
color: transparent
- type: state-icon
entity: binary_sensor.dachluke_hinten
style:
top: 48%
left: 22%
'--mdc-icon-size': 100%
color: transparent
- type: state-icon
entity: binary_sensor.dachluke_mitte
style:
top: 48%
left: 48%
'--mdc-icon-size': 100%
color: transparent
- type: state-icon
entity: binary_sensor.dachluke_vorne
style:
top: 48%
left: 74%
'--mdc-icon-size': 100%
color: transparent
- type: state-icon
entity: binary_sensor.dachluke_mitte_links
style:
top: 29%
left: 41%
'--mdc-icon-size': 100%
color: transparent
- type: state-icon
entity: binary_sensor.tuer
style:
top: 73%
left: 36%
'--mdc-icon-size': 100%
color: transparent
- type: state-icon
entity: input_boolean.unterwegs
tap_action:
action: toggle
style:
top: 88%
left: 34%
'--mdc-icon-size': 100%
color: transparent
image: /local/images/510TK.png
type: picture-elements elements: - type: state-icon entity: binary_sensor.fenster_hinten style: top: 43% left: 4% '--mdc-icon-size': 100% color: transparent - type: state-icon entity: binary_sensor.fenster_hinten_rechts style: top: 85% left: 21% '--mdc-icon-size': 100% color: transparent - type: state-icon entity: binary_sensor.fenster_mitte_rechts style: top: 85% left: 48% '--mdc-icon-size': 100% color: transparent - type: state-icon entity: binary_sensor.fenster_vorne_rechts_unten style: top: 85% left: 73% '--mdc-icon-size': 100% color: transparent - type: state-icon entity: binary_sensor.fenster_vorne_rechts_oben style: top: 85% left: 78% '--mdc-icon-size': 100% color: transparent - type: state-icon entity: binary_sensor.fenster_hinten_links style: top: 10% left: 21% '--mdc-icon-size': 100% background_colour: green color: transparent - type: state-icon entity: binary_sensor.fenster_vorne_links style: top: 10% left: 74% '--mdc-icon-size': 100% color: transparent - type: state-icon entity: binary_sensor.dachluke_hinten style: top: 48% left: 22% '--mdc-icon-size': 100% color: transparent - type: state-icon entity: binary_sensor.dachluke_mitte style: top: 48% left: 48% '--mdc-icon-size': 100% color: transparent - type: state-icon entity: binary_sensor.dachluke_vorne style: top: 48% left: 74% '--mdc-icon-size': 100% color: transparent - type: state-icon entity: binary_sensor.dachluke_mitte_links style: top: 29% left: 41% '--mdc-icon-size': 100% color: transparent - type: state-icon entity: binary_sensor.tuer style: top: 73% left: 36% '--mdc-icon-size': 100% color: transparent - type: state-icon entity: input_boolean.unterwegs tap_action: action: toggle style: top: 88% left: 34% '--mdc-icon-size': 100% color: transparent image: /local/images/510TK.png
type: picture-elements
elements:
  - type: state-icon
    entity: binary_sensor.fenster_hinten
    style:
      top: 43%
      left: 4%
      '--mdc-icon-size': 100%
      color: transparent
  - type: state-icon
    entity: binary_sensor.fenster_hinten_rechts
    style:
      top: 85%
      left: 21%
      '--mdc-icon-size': 100%
      color: transparent
  - type: state-icon
    entity: binary_sensor.fenster_mitte_rechts
    style:
      top: 85%
      left: 48%
      '--mdc-icon-size': 100%
      color: transparent
  - type: state-icon
    entity: binary_sensor.fenster_vorne_rechts_unten
    style:
      top: 85%
      left: 73%
      '--mdc-icon-size': 100%
      color: transparent
  - type: state-icon
    entity: binary_sensor.fenster_vorne_rechts_oben
    style:
      top: 85%
      left: 78%
      '--mdc-icon-size': 100%
      color: transparent
  - type: state-icon
    entity: binary_sensor.fenster_hinten_links
    style:
      top: 10%
      left: 21%
      '--mdc-icon-size': 100%
      background_colour: green
      color: transparent
  - type: state-icon
    entity: binary_sensor.fenster_vorne_links
    style:
      top: 10%
      left: 74%
      '--mdc-icon-size': 100%
      color: transparent
  - type: state-icon
    entity: binary_sensor.dachluke_hinten
    style:
      top: 48%
      left: 22%
      '--mdc-icon-size': 100%
      color: transparent
  - type: state-icon
    entity: binary_sensor.dachluke_mitte
    style:
      top: 48%
      left: 48%
      '--mdc-icon-size': 100%
      color: transparent
  - type: state-icon
    entity: binary_sensor.dachluke_vorne
    style:
      top: 48%
      left: 74%
      '--mdc-icon-size': 100%
      color: transparent
  - type: state-icon
    entity: binary_sensor.dachluke_mitte_links
    style:
      top: 29%
      left: 41%
      '--mdc-icon-size': 100%
      color: transparent
  - type: state-icon
    entity: binary_sensor.tuer
    style:
      top: 73%
      left: 36%
      '--mdc-icon-size': 100%
      color: transparent
  - type: state-icon
    entity: input_boolean.unterwegs
    tap_action:
      action: toggle
    style:
      top: 88%
      left: 34%
      '--mdc-icon-size': 100%
      color: transparent
image: /local/images/510TK.png

Um die Fenster zu überwachen wurde auch eine kleine Automatisierung vorgestellt.

Den YAML Code dazu findest du hier:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
alias: Benachrichtigung , wenn Fenster noch geöffnet ist
description: ""
trigger:
- platform: state
entity_id:
- input_boolean.unterwegs
to: "on"
- platform: time_pattern
minutes: /30
condition:
- condition: and
conditions:
- condition: state
entity_id: binary_sensor.fenster_und_dachluken
state: "on"
- condition: state
entity_id: input_boolean.unterwegs
state: "on"
action:
- service: notify.notify
metadata: {}
data:
message: >-
Achtung: {{ expand('binary_sensor.fenster_und_dachluken') |
selectattr('state','eq','on') | map(attribute='name') | list | join
(',\n') }} ist noch geöffnet
mode: single
alias: Benachrichtigung , wenn Fenster noch geöffnet ist description: "" trigger: - platform: state entity_id: - input_boolean.unterwegs to: "on" - platform: time_pattern minutes: /30 condition: - condition: and conditions: - condition: state entity_id: binary_sensor.fenster_und_dachluken state: "on" - condition: state entity_id: input_boolean.unterwegs state: "on" action: - service: notify.notify metadata: {} data: message: >- Achtung: {{ expand('binary_sensor.fenster_und_dachluken') | selectattr('state','eq','on') | map(attribute='name') | list | join (',\n') }} ist noch geöffnet mode: single
alias: Benachrichtigung , wenn Fenster noch geöffnet ist
description: ""
trigger:
  - platform: state
    entity_id:
      - input_boolean.unterwegs
    to: "on"
  - platform: time_pattern
    minutes: /30
condition:
  - condition: and
    conditions:
      - condition: state
        entity_id: binary_sensor.fenster_und_dachluken
        state: "on"
      - condition: state
        entity_id: input_boolean.unterwegs
        state: "on"
action:
  - service: notify.notify
    metadata: {}
    data:
      message: >-
        Achtung: {{ expand('binary_sensor.fenster_und_dachluken') |
        selectattr('state','eq','on') | map(attribute='name') | list | join
        (',\n') }} ist noch geöffnet
mode: single

Update 01.07.2024: Da mich schon ein paar Fragen zur Einbindung des Rauchmelders ereilt haben, möchte ich euch das Script für den Aqara Rauchmelder hier noch ergänzend zur Verfügung stellen.

Script Sirene einschalten:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
alias: Rauchmelder Sirene einschalten
sequence:
- device_id: cb8b15beb28b9adf6ddcc79b2d193bea
domain: select
entity_id: 1a08cf7364ee5aee41aba55636f6db6b
type: select_option
option: alarm
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
- device_id: cb8b15beb28b9adf6ddcc79b2d193bea
domain: select
entity_id: 1a08cf7364ee5aee41aba55636f6db6b
type: select_option
option: mute
description: ""
icon: mdi:alarm-light
alias: Rauchmelder Sirene einschalten sequence: - device_id: cb8b15beb28b9adf6ddcc79b2d193bea domain: select entity_id: 1a08cf7364ee5aee41aba55636f6db6b type: select_option option: alarm - delay: hours: 0 minutes: 0 seconds: 5 milliseconds: 0 - device_id: cb8b15beb28b9adf6ddcc79b2d193bea domain: select entity_id: 1a08cf7364ee5aee41aba55636f6db6b type: select_option option: mute description: "" icon: mdi:alarm-light
alias: Rauchmelder Sirene einschalten
sequence:
  - device_id: cb8b15beb28b9adf6ddcc79b2d193bea
    domain: select
    entity_id: 1a08cf7364ee5aee41aba55636f6db6b
    type: select_option
    option: alarm
  - delay:
      hours: 0
      minutes: 0
      seconds: 5
      milliseconds: 0
  - device_id: cb8b15beb28b9adf6ddcc79b2d193bea
    domain: select
    entity_id: 1a08cf7364ee5aee41aba55636f6db6b
    type: select_option
    option: mute
description: ""
icon: mdi:alarm-light

Rauchmelder Sirene ausschalten:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
alias: Rauchmelder Sirene ausschalten
sequence:
- device_id: cb8b15beb28b9adf6ddcc79b2d193bea
domain: select
entity_id: 1a08cf7364ee5aee41aba55636f6db6b
type: select_option
option: mute
description: ""
icon: mdi:alarm-light-off
alias: Rauchmelder Sirene ausschalten sequence: - device_id: cb8b15beb28b9adf6ddcc79b2d193bea domain: select entity_id: 1a08cf7364ee5aee41aba55636f6db6b type: select_option option: mute description: "" icon: mdi:alarm-light-off
alias: Rauchmelder Sirene ausschalten
sequence:
  - device_id: cb8b15beb28b9adf6ddcc79b2d193bea
    domain: select
    entity_id: 1a08cf7364ee5aee41aba55636f6db6b
    type: select_option
    option: mute
description: ""
icon: mdi:alarm-light-off

Home Assistant: EVCC-Daten zu dynamischen Strompreisen auslesen, visualisieren und damit rechnen

Verwandle dein Smart Home mit dynamischen Strompreisen! In diesem Video zeigen wir dir, wie du mit Home Assistant und EVCC nicht nur die aktuellen Strompreise ausliest, sondern auch visualisierst und clever damit rechnest. Spare bares Geld und optimiere deinen Energieverbrauch – jetzt reinschauen und profitieren! Plus: Erfahre alles über eine exklusive Bonusautomatisierung, die dir noch mehr Effizienz bringt! 💡🔌💸

Wenn du mehr über EVCC kennenlernen willst, dann findest du hier weitere nützliche Informationen.

Aus meiner Sicht ist EVCC nicht nur eine Managementsoftware für eure Wallbox und Elektroauto. Mit EVCC könnt ihr unabhängig von der Schnittstelle eures Wechselrichters, Batteriespeichers, dynamischen Stromanbieter etc… auf aufbereiteten Daten agieren und diese für tolle Automatisierungen und Visualisierungen in Home Assistant nutzen.

Ich möchte euch heute einen allgemeinen Amazon-Link teilen, über den ihr eine Vielzahl von Produkten entdecken könnt. Egal, ob ihr nach Smart Home-Geräten, Gadgets oder anderen nützlichen Artikeln sucht, Amazon hat für jeden etwas zu bieten.

Wenn ihr über diesen Link einkauft, unterstützt ihr meinen Kanal, ohne dass es für euch zusätzliche Kosten verursacht. Das hilft mir, weiterhin spannende Inhalte für euch zu erstellen!

Hier ist der Link zu Amazon: https://amzn.to/3KsGngK

https://amzn.to/3KsGngK

Um die Inhalte besser verstehen zu können, empfehle ich euch folgende Videos ebenfalls anzuschauen:

YouTube player
Hier erfährst du in wenigen Minuten, wie man HACS installiert.
YouTube player
Basisinstallation der Software EVCC
YouTube player
In diesem Video zeige ich euch, wie man mit Home Assistant aus den Daten von EVCC MQTT Sensoren erstellt.

Links , in denen ihr weitere Informationen findet:

Restful Sensor in der Configuration.yaml

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sensor:
- platform: rest
name: EVCC Tariff Forecast
unique_id: evcc_tariff_forecast
resource: http://192.168.101.3:7070/api/tariff/grid
value_template: "{{value_json.result.rates[0].price}}"
json_attributes:
- result
scan_interval: 60
sensor: - platform: rest name: EVCC Tariff Forecast unique_id: evcc_tariff_forecast resource: http://192.168.101.3:7070/api/tariff/grid value_template: "{{value_json.result.rates[0].price}}" json_attributes: - result scan_interval: 60
sensor:

  - platform: rest
    name: EVCC Tariff Forecast
    unique_id: evcc_tariff_forecast
    resource: http://192.168.101.3:7070/api/tariff/grid
    value_template: "{{value_json.result.rates[0].price}}"
    json_attributes:
       - result
    scan_interval: 60

Template Helfer : sensor.evcc_tibber_forecast_max_value_today

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
{{state_attr('sensor.evcc_tariff_forecast', 'result')['rates'] | selectattr('start', 'ge', now().strftime('%Y-%m-%dT00:00:00%z')) | selectattr('start','lt', now().strftime('%Y-%m-%dT23:59:59%z')) | map(attribute='price') | max }}
{{state_attr('sensor.evcc_tariff_forecast', 'result')['rates'] | selectattr('start', 'ge', now().strftime('%Y-%m-%dT00:00:00%z')) | selectattr('start','lt', now().strftime('%Y-%m-%dT23:59:59%z')) | map(attribute='price') | max }}
{{state_attr('sensor.evcc_tariff_forecast', 'result')['rates'] | selectattr('start', 'ge', now().strftime('%Y-%m-%dT00:00:00%z')) | selectattr('start','lt', now().strftime('%Y-%m-%dT23:59:59%z')) | map(attribute='price') | max }}

Template Helfer: evcc_tibber_forecast_min_value_today

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
{{state_attr('sensor.evcc_tariff_forecast', 'result')['rates'] | selectattr('start', 'ge', now().strftime('%Y-%m-%dT00:00:00%z')) | selectattr('start','lt', now().strftime('%Y-%m-%dT23:59:59%z')) | map(attribute='price') | min }}
{{state_attr('sensor.evcc_tariff_forecast', 'result')['rates'] | selectattr('start', 'ge', now().strftime('%Y-%m-%dT00:00:00%z')) | selectattr('start','lt', now().strftime('%Y-%m-%dT23:59:59%z')) | map(attribute='price') | min }}
{{state_attr('sensor.evcc_tariff_forecast', 'result')['rates'] | selectattr('start', 'ge', now().strftime('%Y-%m-%dT00:00:00%z')) | selectattr('start','lt', now().strftime('%Y-%m-%dT23:59:59%z')) | map(attribute='price') | min }}

Template Helfer: evcc_tibber_forecast_max_value_tomorrow

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
{{state_attr('sensor.evcc_tariff_forecast', 'result')['rates'] | selectattr('start', 'ge', (now() + timedelta(days=1)).strftime('%Y-%m-%dT00:00:00%z')) | selectattr('start','lt',(now() + timedelta(days=1)).strftime('%Y-%m-%dT23:59:59%z')) | map(attribute='price') | max | default(0) }}
{{state_attr('sensor.evcc_tariff_forecast', 'result')['rates'] | selectattr('start', 'ge', (now() + timedelta(days=1)).strftime('%Y-%m-%dT00:00:00%z')) | selectattr('start','lt',(now() + timedelta(days=1)).strftime('%Y-%m-%dT23:59:59%z')) | map(attribute='price') | max | default(0) }}
{{state_attr('sensor.evcc_tariff_forecast', 'result')['rates'] | selectattr('start', 'ge', (now() + timedelta(days=1)).strftime('%Y-%m-%dT00:00:00%z')) | selectattr('start','lt',(now() + timedelta(days=1)).strftime('%Y-%m-%dT23:59:59%z')) | map(attribute='price') | max | default(0) }}

Template Helfer: evcc_tibber_forecast_min_value_tomorrow

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
{{state_attr('sensor.evcc_tariff_forecast', 'result')['rates'] | selectattr('start', 'ge', (now() + timedelta(days=1)).strftime('%Y-%m-%dT00:00:00%z')) | selectattr('start','lt',(now() + timedelta(days=1)).strftime('%Y-%m-%dT23:59:59%z')) | map(attribute='price') | min| default(0) }}
{{state_attr('sensor.evcc_tariff_forecast', 'result')['rates'] | selectattr('start', 'ge', (now() + timedelta(days=1)).strftime('%Y-%m-%dT00:00:00%z')) | selectattr('start','lt',(now() + timedelta(days=1)).strftime('%Y-%m-%dT23:59:59%z')) | map(attribute='price') | min| default(0) }}
{{state_attr('sensor.evcc_tariff_forecast', 'result')['rates'] | selectattr('start', 'ge', (now() + timedelta(days=1)).strftime('%Y-%m-%dT00:00:00%z')) | selectattr('start','lt',(now() + timedelta(days=1)).strftime('%Y-%m-%dT23:59:59%z')) | map(attribute='price') | min| default(0) }}

Für die Visualisierung habe ich die Apex Chart Card aus dem Video ein wenig optimiert. Hier findet ihr die optimierte Variante als Code Beispiel ( die nötigen MQTT Sensoren aus EVCC findet ihr weiter unten ) :

Weitere Infos zum Umgang mit der Apex Chart Card, habe ich in diesem Video erklärt:

YouTube player
Forecastdaten mit Apex Chart Card visualisieren.
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
type: custom:apexcharts-card
apex_config:
chart:
height: 268px
all_series_config:
unit: kWh
header:
title: Evcc Tibber Forecast
show: true
standard_format: true
show_states: true
colorize_states: true
graph_span: 2d
span:
start: day
offset: '+0'
now:
show: true
label: Jetzt
yaxis:
- id: kwh
min: 0
apex_config:
tickAmount: 5
- id: header
show: false
series:
- entity: sensor.evcc_tariff_forecast
yaxis_id: kwh
type: area
name: Forecast heute
color: green
data_generator: >
let now = new Date().getTime();
let rates = entity.attributes.result.rates;
let filteredRates = rates.filter(rate => new Date(rate["start"]).getTime()
<= now);
return filteredRates.map(rate => [new Date(rate["start"]).getTime(),
rate["price"]]);
show:
legend_value: false
in_header: false
stroke_width: 4
float_precision: 2
extend_to: false
- entity: sensor.evcc_tariff_forecast
yaxis_id: kwh
type: area
name: Forecast heute (nach Jetzt)
color: yellow
data_generator: >
let now = new Date().getTime()- 3600000;
let rates = entity.attributes.result.rates;
let filteredRates = rates.filter(rate => new Date(rate["start"]).getTime()
> now);
return filteredRates.map(rate => [new Date(rate["start"]).getTime(),
rate["price"]]);
show:
legend_value: false
in_header: false
stroke_width: 4
float_precision: 2
extend_to: false
- entity: sensor.evcc_tariff_grid
color: green
yaxis_id: header
name: Aktueller Preis
unit: ' € '
float_precision: 2
show:
legend_value: true
in_header: true
in_chart: false
- entity: sensor.evcc_tibber_forecast_min_value_today
color: yellow
yaxis_id: header
name: Min(heute)
unit: ' € '
float_precision: 2
show:
legend_value: true
in_header: true
in_chart: false
- entity: sensor.evcc_tibber_forecast_max_value_today
color: yellow
yaxis_id: header
name: Max(heute)
unit: ' € '
float_precision: 2
show:
legend_value: true
in_header: true
in_chart: false
- entity: sensor.evcc_tibber_forecast_min_value_tomorrow
color: yellow
yaxis_id: header
name: Min(morgen)
unit: ' € '
float_precision: 2
show:
legend_value: true
in_header: true
in_chart: false
- entity: sensor.evcc_tibber_forecast_max_value_tomorrow
color: yellow
yaxis_id: header
name: Max(morgen)
unit: ' € '
float_precision: 2
show:
legend_value: true
in_header: true
in_chart: false
type: custom:apexcharts-card apex_config: chart: height: 268px all_series_config: unit: kWh header: title: Evcc Tibber Forecast show: true standard_format: true show_states: true colorize_states: true graph_span: 2d span: start: day offset: '+0' now: show: true label: Jetzt yaxis: - id: kwh min: 0 apex_config: tickAmount: 5 - id: header show: false series: - entity: sensor.evcc_tariff_forecast yaxis_id: kwh type: area name: Forecast heute color: green data_generator: > let now = new Date().getTime(); let rates = entity.attributes.result.rates; let filteredRates = rates.filter(rate => new Date(rate["start"]).getTime() <= now); return filteredRates.map(rate => [new Date(rate["start"]).getTime(), rate["price"]]); show: legend_value: false in_header: false stroke_width: 4 float_precision: 2 extend_to: false - entity: sensor.evcc_tariff_forecast yaxis_id: kwh type: area name: Forecast heute (nach Jetzt) color: yellow data_generator: > let now = new Date().getTime()- 3600000; let rates = entity.attributes.result.rates; let filteredRates = rates.filter(rate => new Date(rate["start"]).getTime() > now); return filteredRates.map(rate => [new Date(rate["start"]).getTime(), rate["price"]]); show: legend_value: false in_header: false stroke_width: 4 float_precision: 2 extend_to: false - entity: sensor.evcc_tariff_grid color: green yaxis_id: header name: Aktueller Preis unit: ' € ' float_precision: 2 show: legend_value: true in_header: true in_chart: false - entity: sensor.evcc_tibber_forecast_min_value_today color: yellow yaxis_id: header name: Min(heute) unit: ' € ' float_precision: 2 show: legend_value: true in_header: true in_chart: false - entity: sensor.evcc_tibber_forecast_max_value_today color: yellow yaxis_id: header name: Max(heute) unit: ' € ' float_precision: 2 show: legend_value: true in_header: true in_chart: false - entity: sensor.evcc_tibber_forecast_min_value_tomorrow color: yellow yaxis_id: header name: Min(morgen) unit: ' € ' float_precision: 2 show: legend_value: true in_header: true in_chart: false - entity: sensor.evcc_tibber_forecast_max_value_tomorrow color: yellow yaxis_id: header name: Max(morgen) unit: ' € ' float_precision: 2 show: legend_value: true in_header: true in_chart: false
type: custom:apexcharts-card
apex_config:
  chart:
    height: 268px
all_series_config:
  unit: kWh
header:
  title: Evcc Tibber Forecast
  show: true
  standard_format: true
  show_states: true
  colorize_states: true
graph_span: 2d
span:
  start: day
  offset: '+0'
now:
  show: true
  label: Jetzt
yaxis:
  - id: kwh
    min: 0
    apex_config:
      tickAmount: 5
  - id: header
    show: false
series:
  - entity: sensor.evcc_tariff_forecast
    yaxis_id: kwh
    type: area
    name: Forecast heute
    color: green
    data_generator: >
      let now = new Date().getTime();

      let rates = entity.attributes.result.rates;

      let filteredRates = rates.filter(rate => new Date(rate["start"]).getTime()
      <= now);

      return filteredRates.map(rate => [new Date(rate["start"]).getTime(),
      rate["price"]]);
    show:
      legend_value: false
      in_header: false
    stroke_width: 4
    float_precision: 2
    extend_to: false
  - entity: sensor.evcc_tariff_forecast
    yaxis_id: kwh
    type: area
    name: Forecast heute (nach Jetzt)
    color: yellow
    data_generator: >
      let now = new Date().getTime()- 3600000;

      let rates = entity.attributes.result.rates;

      let filteredRates = rates.filter(rate => new Date(rate["start"]).getTime()
      > now);

      return filteredRates.map(rate => [new Date(rate["start"]).getTime(),
      rate["price"]]);
    show:
      legend_value: false
      in_header: false
    stroke_width: 4
    float_precision: 2
    extend_to: false
  - entity: sensor.evcc_tariff_grid
    color: green
    yaxis_id: header
    name: Aktueller Preis
    unit: ' € '
    float_precision: 2
    show:
      legend_value: true
      in_header: true
      in_chart: false
  - entity: sensor.evcc_tibber_forecast_min_value_today
    color: yellow
    yaxis_id: header
    name: Min(heute)
    unit: ' € '
    float_precision: 2
    show:
      legend_value: true
      in_header: true
      in_chart: false
  - entity: sensor.evcc_tibber_forecast_max_value_today
    color: yellow
    yaxis_id: header
    name: Max(heute)
    unit: ' € '
    float_precision: 2
    show:
      legend_value: true
      in_header: true
      in_chart: false
  - entity: sensor.evcc_tibber_forecast_min_value_tomorrow
    color: yellow
    yaxis_id: header
    name: Min(morgen)
    unit: ' € '
    float_precision: 2
    show:
      legend_value: true
      in_header: true
      in_chart: false
  - entity: sensor.evcc_tibber_forecast_max_value_tomorrow
    color: yellow
    yaxis_id: header
    name: Max(morgen)
    unit: ' € '
    float_precision: 2
    show:
      legend_value: true
      in_header: true
      in_chart: false

Alle diese Daten habe ich auch aus EVCC extrahiert. Hier findet ihr die nötigen MQTT-Sensoren:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
mqtt:
sensor:
- name: "EVCC Grid Power"
unique_id: evcc_grid_power
state_topic: "evcc/site/gridPower"
unit_of_measurement: "W"
availability_topic: "evcc/status"
- name: "EVCC PV Power"
unique_id: evcc_pv_power
state_topic: "evcc/site/pvPower"
#value_template: "{{ value | round(1) }}"
unit_of_measurement: "W"
availability_topic: "evcc/status"
- name: "EVCC Tariff Grid"
unique_id: evcc_tariff_grid
state_topic: "evcc/site/tariffGrid"
unit_of_measurement: "EUR/kWh"
availability_topic: "evcc/status"
- name: "EVCC Tariff Feed In"
unique_id: 3bd64d9d-0e8d-41ad-9db3-b0a4774120c1
state_topic: "evcc/site/tariffFeedIn"
unit_of_measurement: "EUR/kWh"
availability_topic: "evcc/status"
- name: "EVCC geladen an Wallbox"
unique_id: evcc_geladen_an_Wallbox
state_topic: "evcc/site/statistics/total/chargedKWh"
unit_of_measurement: "kWh"
availability_topic: "evcc/status"
device_class: energy
state_class: total_increasing
- name: "EVCC Hausverbrauch"
unique_id: evcc_hausverbrauch
state_topic: "evcc/site/homePower"
unit_of_measurement: "W"
availability_topic: "evcc/status"
- name: "EVCC Battery Power"
unique_id: evcc_battery_Power
state_topic: "evcc/site/batteryPower"
unit_of_measurement: "W"
availability_topic: "evcc/status"
mqtt: sensor: - name: "EVCC Grid Power" unique_id: evcc_grid_power state_topic: "evcc/site/gridPower" unit_of_measurement: "W" availability_topic: "evcc/status" - name: "EVCC PV Power" unique_id: evcc_pv_power state_topic: "evcc/site/pvPower" #value_template: "{{ value | round(1) }}" unit_of_measurement: "W" availability_topic: "evcc/status" - name: "EVCC Tariff Grid" unique_id: evcc_tariff_grid state_topic: "evcc/site/tariffGrid" unit_of_measurement: "EUR/kWh" availability_topic: "evcc/status" - name: "EVCC Tariff Feed In" unique_id: 3bd64d9d-0e8d-41ad-9db3-b0a4774120c1 state_topic: "evcc/site/tariffFeedIn" unit_of_measurement: "EUR/kWh" availability_topic: "evcc/status" - name: "EVCC geladen an Wallbox" unique_id: evcc_geladen_an_Wallbox state_topic: "evcc/site/statistics/total/chargedKWh" unit_of_measurement: "kWh" availability_topic: "evcc/status" device_class: energy state_class: total_increasing - name: "EVCC Hausverbrauch" unique_id: evcc_hausverbrauch state_topic: "evcc/site/homePower" unit_of_measurement: "W" availability_topic: "evcc/status" - name: "EVCC Battery Power" unique_id: evcc_battery_Power state_topic: "evcc/site/batteryPower" unit_of_measurement: "W" availability_topic: "evcc/status"
mqtt: 

  sensor:
   - name: "EVCC Grid Power"
     unique_id: evcc_grid_power
     state_topic: "evcc/site/gridPower"
     unit_of_measurement: "W"
     availability_topic: "evcc/status"
     
   - name: "EVCC PV Power"
     unique_id: evcc_pv_power
     state_topic: "evcc/site/pvPower"
     #value_template: "{{ value | round(1) }}"
     unit_of_measurement: "W"
     availability_topic: "evcc/status"
     
   - name: "EVCC Tariff Grid"
     unique_id: evcc_tariff_grid
     state_topic: "evcc/site/tariffGrid"
     unit_of_measurement: "EUR/kWh"
     availability_topic: "evcc/status"

   - name: "EVCC Tariff Feed In"
     unique_id: 3bd64d9d-0e8d-41ad-9db3-b0a4774120c1
     state_topic: "evcc/site/tariffFeedIn"
     unit_of_measurement: "EUR/kWh"
     availability_topic: "evcc/status"
     
   - name: "EVCC geladen an Wallbox"
     unique_id: evcc_geladen_an_Wallbox
     state_topic: "evcc/site/statistics/total/chargedKWh"
     unit_of_measurement: "kWh"
     availability_topic: "evcc/status"
     device_class: energy
     state_class: total_increasing

   - name: "EVCC Hausverbrauch"
     unique_id: evcc_hausverbrauch
     state_topic: "evcc/site/homePower"
     unit_of_measurement: "W"
     availability_topic: "evcc/status"
     
   - name: "EVCC Battery Power"
     unique_id: evcc_battery_Power
     state_topic: "evcc/site/batteryPower"
     unit_of_measurement: "W"
     availability_topic: "evcc/status"

Bonus shell_command Sensor für das Deaktivieren der EVCC Batteriemanagement Funktion über die REST API von EVCC in der Configuration.yaml

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
shell_command:
batterie_aus: curl -X POST http://192.168.101.3:7070/api/batterydischargecontrol/false
batterie_an: curl -X POST http://192.168.101.3:7070/api/batterydischargecontrol/true
shell_command: batterie_aus: curl -X POST http://192.168.101.3:7070/api/batterydischargecontrol/false batterie_an: curl -X POST http://192.168.101.3:7070/api/batterydischargecontrol/true
shell_command:
  batterie_aus: curl -X POST http://192.168.101.3:7070/api/batterydischargecontrol/false
  batterie_an: curl -X POST http://192.168.101.3:7070/api/batterydischargecontrol/true

Automatisierung , um bei sehr günstigem Strompreis ( Preis liegt unter der Einspeisevergütung) den Batteriespeicher zu laden:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
alias: Speicher Laden und abschalten, da so günstiger
description: ""
trigger:
- platform: numeric_state
entity_id:
- sensor.evcc_tariff_grid
below: sensor.evcc_tariff_feed_in
id: Es ist günstiger aus dem Netz zu beziehen
- platform: numeric_state
entity_id:
- sensor.evcc_tariff_grid
id: Es ist teurer aus dem Netz zu beziehen
above: sensor.evcc_tariff_feed_in
- platform: numeric_state
entity_id:
- sensor.evcc_battery_soc
above: 99
id: Speicher hat 100 % erreicht
condition:
- condition: time
after: "06:00:00"
before: "20:00:00"
action:
- choose:
- conditions:
- condition: trigger
id:
- Es ist günstiger aus dem Netz zu beziehen
sequence:
- service: shell_command.batterie_aus
metadata: {}
data: {}
- device_id: 1659e926aef842a56f4fc8960bf10ca1
domain: select
entity_id: 6427b7e3fd03320c47261c2767cc0c41
type: select_option
option: Charge from Solar Power and Grid
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
- device_id: 1659e926aef842a56f4fc8960bf10ca1
domain: number
entity_id: cedb1c19907bf5f26d82807c7a46b72e
type: set_value
value: 36000
- conditions:
- condition: trigger
id:
- Es ist teurer aus dem Netz zu beziehen
sequence:
- service: shell_command.batterie_an
metadata: {}
data: {}
- device_id: 1659e926aef842a56f4fc8960bf10ca1
domain: select
entity_id: 6427b7e3fd03320c47261c2767cc0c41
type: select_option
option: Maximize Self Consumption
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
- device_id: 1659e926aef842a56f4fc8960bf10ca1
domain: number
entity_id: cedb1c19907bf5f26d82807c7a46b72e
type: set_value
value: 3600
- conditions:
- condition: and
conditions:
- condition: trigger
id:
- Speicher hat 100 % erreicht
- condition: numeric_state
entity_id: sensor.evcc_tariff_grid
below: sensor.evcc_tariff_feed_in
sequence:
- device_id: 1659e926aef842a56f4fc8960bf10ca1
domain: select
entity_id: 6427b7e3fd03320c47261c2767cc0c41
type: select_option
option: Solar Power Only (Off)
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
- device_id: 1659e926aef842a56f4fc8960bf10ca1
domain: number
entity_id: cedb1c19907bf5f26d82807c7a46b72e
type: set_value
value: 36000
mode: single
alias: Speicher Laden und abschalten, da so günstiger description: "" trigger: - platform: numeric_state entity_id: - sensor.evcc_tariff_grid below: sensor.evcc_tariff_feed_in id: Es ist günstiger aus dem Netz zu beziehen - platform: numeric_state entity_id: - sensor.evcc_tariff_grid id: Es ist teurer aus dem Netz zu beziehen above: sensor.evcc_tariff_feed_in - platform: numeric_state entity_id: - sensor.evcc_battery_soc above: 99 id: Speicher hat 100 % erreicht condition: - condition: time after: "06:00:00" before: "20:00:00" action: - choose: - conditions: - condition: trigger id: - Es ist günstiger aus dem Netz zu beziehen sequence: - service: shell_command.batterie_aus metadata: {} data: {} - device_id: 1659e926aef842a56f4fc8960bf10ca1 domain: select entity_id: 6427b7e3fd03320c47261c2767cc0c41 type: select_option option: Charge from Solar Power and Grid - delay: hours: 0 minutes: 0 seconds: 10 milliseconds: 0 - device_id: 1659e926aef842a56f4fc8960bf10ca1 domain: number entity_id: cedb1c19907bf5f26d82807c7a46b72e type: set_value value: 36000 - conditions: - condition: trigger id: - Es ist teurer aus dem Netz zu beziehen sequence: - service: shell_command.batterie_an metadata: {} data: {} - device_id: 1659e926aef842a56f4fc8960bf10ca1 domain: select entity_id: 6427b7e3fd03320c47261c2767cc0c41 type: select_option option: Maximize Self Consumption - delay: hours: 0 minutes: 0 seconds: 10 milliseconds: 0 - device_id: 1659e926aef842a56f4fc8960bf10ca1 domain: number entity_id: cedb1c19907bf5f26d82807c7a46b72e type: set_value value: 3600 - conditions: - condition: and conditions: - condition: trigger id: - Speicher hat 100 % erreicht - condition: numeric_state entity_id: sensor.evcc_tariff_grid below: sensor.evcc_tariff_feed_in sequence: - device_id: 1659e926aef842a56f4fc8960bf10ca1 domain: select entity_id: 6427b7e3fd03320c47261c2767cc0c41 type: select_option option: Solar Power Only (Off) - delay: hours: 0 minutes: 0 seconds: 10 milliseconds: 0 - device_id: 1659e926aef842a56f4fc8960bf10ca1 domain: number entity_id: cedb1c19907bf5f26d82807c7a46b72e type: set_value value: 36000 mode: single
alias: Speicher Laden und abschalten, da so günstiger
description: ""
trigger:
  - platform: numeric_state
    entity_id:
      - sensor.evcc_tariff_grid
    below: sensor.evcc_tariff_feed_in
    id: Es ist günstiger aus dem Netz zu beziehen
  - platform: numeric_state
    entity_id:
      - sensor.evcc_tariff_grid
    id: Es ist teurer aus dem Netz zu beziehen
    above: sensor.evcc_tariff_feed_in
  - platform: numeric_state
    entity_id:
      - sensor.evcc_battery_soc
    above: 99
    id: Speicher hat 100 % erreicht
condition:
  - condition: time
    after: "06:00:00"
    before: "20:00:00"
action:
  - choose:
      - conditions:
          - condition: trigger
            id:
              - Es ist günstiger aus dem Netz zu beziehen
        sequence:
          - service: shell_command.batterie_aus
            metadata: {}
            data: {}
          - device_id: 1659e926aef842a56f4fc8960bf10ca1
            domain: select
            entity_id: 6427b7e3fd03320c47261c2767cc0c41
            type: select_option
            option: Charge from Solar Power and Grid
          - delay:
              hours: 0
              minutes: 0
              seconds: 10
              milliseconds: 0
          - device_id: 1659e926aef842a56f4fc8960bf10ca1
            domain: number
            entity_id: cedb1c19907bf5f26d82807c7a46b72e
            type: set_value
            value: 36000
      - conditions:
          - condition: trigger
            id:
              - Es ist teurer aus dem Netz zu beziehen
        sequence:
          - service: shell_command.batterie_an
            metadata: {}
            data: {}
          - device_id: 1659e926aef842a56f4fc8960bf10ca1
            domain: select
            entity_id: 6427b7e3fd03320c47261c2767cc0c41
            type: select_option
            option: Maximize Self Consumption
          - delay:
              hours: 0
              minutes: 0
              seconds: 10
              milliseconds: 0
          - device_id: 1659e926aef842a56f4fc8960bf10ca1
            domain: number
            entity_id: cedb1c19907bf5f26d82807c7a46b72e
            type: set_value
            value: 3600
      - conditions:
          - condition: and
            conditions:
              - condition: trigger
                id:
                  - Speicher hat 100 % erreicht
              - condition: numeric_state
                entity_id: sensor.evcc_tariff_grid
                below: sensor.evcc_tariff_feed_in
        sequence:
          - device_id: 1659e926aef842a56f4fc8960bf10ca1
            domain: select
            entity_id: 6427b7e3fd03320c47261c2767cc0c41
            type: select_option
            option: Solar Power Only (Off)
          - delay:
              hours: 0
              minutes: 0
              seconds: 10
              milliseconds: 0
          - device_id: 1659e926aef842a56f4fc8960bf10ca1
            domain: number
            entity_id: cedb1c19907bf5f26d82807c7a46b72e
            type: set_value
            value: 36000
mode: single

Viel Spaß 🙂

Wenn ihr ebenfalls noch Automatisierungsideen oder Lösungen in diesem Zusammenhang habt, kommt gerne auf meinen Discord Server und präsentiert dort eure Lösung.

Home Assistant in Aktion: Anwesenheitssimulation leicht gemacht. Auch für Einsteiger !

Erlebe die Zukunft des Wohnens mit Home Assistant! Entdecke, wie du spielend leicht eine überzeugende Anwesenheitssimulation erstellst – perfekt auch für Neueinsteiger. Tauche ein in die Welt der DIY-Hausautomatisierung und sichere dein Zuhause mit innovativer Technologie.

Ich möchte euch heute einen allgemeinen Amazon-Link teilen, über den ihr eine Vielzahl von Produkten entdecken könnt. Egal, ob ihr nach Smart Home-Geräten, Gadgets oder anderen nützlichen Artikeln sucht, Amazon hat für jeden etwas zu bieten.

Wenn ihr über diesen Link einkauft, unterstützt ihr meinen Kanal, ohne dass es für euch zusätzliche Kosten verursacht. Das hilft mir, weiterhin spannende Inhalte für euch zu erstellen!

Hier ist der Link zu Amazon: https://amzn.to/3KsGngK

In meinem Shop findest du interessante Produkte *

Hier findest du meine Beispielautomatisierung:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
alias: Video_Präsenzsimulation_Urlaub
description: ""
trigger:
- platform: sun
event: sunset
offset: "-00:30:00"
condition: []
action:
- repeat:
sequence:
- service: light.turn_off
metadata: {}
data: {}
target:
entity_id: light.lichtergruppe1
- delay:
minutes: "{{ range(2,5) | random }}"
- service: light.turn_on
metadata: {}
data_template:
entity_id: |
{{ state_attr('light.lichtergruppe1','entity_id') | random }}
- delay:
minutes: "{{ range(2,5) | random }}"
- service: light.turn_off
metadata: {}
data: {}
target:
entity_id: light.lichtergruppe2
- delay:
minutes: "{{ range(2,5) | random }}"
- service: light.turn_on
metadata: {}
data_template:
entity_id: |
{{ state_attr('light.lichtergruppe2','entity_id') | random }}
while:
- condition: and
conditions:
- condition: time
before: "23:00:00"
- condition: state
entity_id: input_boolean.urlaubsmodus
state: "on"
- if:
- condition: or
conditions:
- condition: trigger
id:
- Urlaub ist beendet
- condition: and # im Video fehlte diese logische & Verknüpfung mit dem Zustand des Urlaubsmodus
conditions:
- condition: trigger
id:
- Es wird nun geschlafen
- condition: state
entity_id: input_boolean.urlaubsmodus
state: "on"
then:
- service: light.turn_off
metadata: {}
data: {}
target:
entity_id:
- light.lichtergruppe1
- light.lichtergruppe2
mode: single
alias: Video_Präsenzsimulation_Urlaub description: "" trigger: - platform: sun event: sunset offset: "-00:30:00" condition: [] action: - repeat: sequence: - service: light.turn_off metadata: {} data: {} target: entity_id: light.lichtergruppe1 - delay: minutes: "{{ range(2,5) | random }}" - service: light.turn_on metadata: {} data_template: entity_id: | {{ state_attr('light.lichtergruppe1','entity_id') | random }} - delay: minutes: "{{ range(2,5) | random }}" - service: light.turn_off metadata: {} data: {} target: entity_id: light.lichtergruppe2 - delay: minutes: "{{ range(2,5) | random }}" - service: light.turn_on metadata: {} data_template: entity_id: | {{ state_attr('light.lichtergruppe2','entity_id') | random }} while: - condition: and conditions: - condition: time before: "23:00:00" - condition: state entity_id: input_boolean.urlaubsmodus state: "on" - if: - condition: or conditions: - condition: trigger id: - Urlaub ist beendet - condition: and # im Video fehlte diese logische & Verknüpfung mit dem Zustand des Urlaubsmodus conditions: - condition: trigger id: - Es wird nun geschlafen - condition: state entity_id: input_boolean.urlaubsmodus state: "on" then: - service: light.turn_off metadata: {} data: {} target: entity_id: - light.lichtergruppe1 - light.lichtergruppe2 mode: single
alias: Video_Präsenzsimulation_Urlaub
description: ""
trigger:
  - platform: sun
    event: sunset
    offset: "-00:30:00"
condition: []
action:
  - repeat:
      sequence:
        - service: light.turn_off
          metadata: {}
          data: {}
          target:
            entity_id: light.lichtergruppe1
        - delay:
            minutes: "{{ range(2,5) | random }}"
        - service: light.turn_on
          metadata: {}
          data_template:
            entity_id: |
              {{ state_attr('light.lichtergruppe1','entity_id') | random }}
        - delay:
            minutes: "{{ range(2,5) | random }}"
        - service: light.turn_off
          metadata: {}
          data: {}
          target:
            entity_id: light.lichtergruppe2
        - delay:
            minutes: "{{ range(2,5) | random }}"
        - service: light.turn_on
          metadata: {}
          data_template:
            entity_id: |
              {{ state_attr('light.lichtergruppe2','entity_id') | random }}
      while:
        - condition: and
          conditions:
            - condition: time
              before: "23:00:00"
            - condition: state
              entity_id: input_boolean.urlaubsmodus
              state: "on"
  - if:
      - condition: or
        conditions:
          - condition: trigger
            id:
              - Urlaub ist beendet
          - condition: and # im Video fehlte diese logische & Verknüpfung mit dem Zustand des Urlaubsmodus
            conditions:
              - condition: trigger
                id:
                  - Es wird nun geschlafen
              - condition: state
                entity_id: input_boolean.urlaubsmodus
                state: "on"
    then:
      - service: light.turn_off
        metadata: {}
        data: {}
        target:
          entity_id:
            - light.lichtergruppe1
            - light.lichtergruppe2
mode: single

Möchte man die Automatisierung direkt beenden, wenn z.B. 23:00 Uhr ist , oder der Urlaubsmodus beendet wird, dann kann man die Automatisierung in den Modus „Neustart“ setzen.

Hier ein Beispiel dazu:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
alias: Video_Präsenzsimulation_Urlaub
description: ""
trigger:
- platform: sun
event: sunset
offset: "-00:30:00"
- platform: state
entity_id:
- input_boolean.urlaubsmodus
to: "off"
id: Urlaub ist beendet
- platform: time
at: "23:00:00"
id: Es ist 23 Uhr
condition: []
action:
- repeat:
sequence:
- service: light.turn_off
metadata: {}
data: {}
target:
entity_id: light.lichtergruppe1
- delay:
minutes: "{{ range(2,5) | random }}"
- service: light.turn_on
metadata: {}
data_template:
entity_id: |
{{ state_attr('light.lichtergruppe1','entity_id') | random }}
- delay:
minutes: "{{ range(2,5) | random }}"
- service: light.turn_off
metadata: {}
data: {}
target:
entity_id: light.lichtergruppe2
- delay:
minutes: "{{ range(2,5) | random }}"
- service: light.turn_on
metadata: {}
data_template:
entity_id: |
{{ state_attr('light.lichtergruppe2','entity_id') | random }}
while:
- condition: and
conditions:
- condition: time
before: "23:00:00"
- condition: state
entity_id: input_boolean.urlaubsmodus
state: "on"
- if:
- condition: or
conditions:
- condition: trigger
id:
- Urlaub ist beendet
- condition: and # im Video fehlte diese logische & Verknüpfung mit dem Zustand des Urlaubsmodus
conditions:
- condition: trigger
id:
- Es wird nun geschlafen
- condition: state
entity_id: input_boolean.urlaubsmodus
state: "on"
then:
- service: light.turn_off
metadata: {}
data: {}
target:
entity_id:
- light.lichtergruppe1
- light.lichtergruppe2
mode: restart
alias: Video_Präsenzsimulation_Urlaub description: "" trigger: - platform: sun event: sunset offset: "-00:30:00" - platform: state entity_id: - input_boolean.urlaubsmodus to: "off" id: Urlaub ist beendet - platform: time at: "23:00:00" id: Es ist 23 Uhr condition: [] action: - repeat: sequence: - service: light.turn_off metadata: {} data: {} target: entity_id: light.lichtergruppe1 - delay: minutes: "{{ range(2,5) | random }}" - service: light.turn_on metadata: {} data_template: entity_id: | {{ state_attr('light.lichtergruppe1','entity_id') | random }} - delay: minutes: "{{ range(2,5) | random }}" - service: light.turn_off metadata: {} data: {} target: entity_id: light.lichtergruppe2 - delay: minutes: "{{ range(2,5) | random }}" - service: light.turn_on metadata: {} data_template: entity_id: | {{ state_attr('light.lichtergruppe2','entity_id') | random }} while: - condition: and conditions: - condition: time before: "23:00:00" - condition: state entity_id: input_boolean.urlaubsmodus state: "on" - if: - condition: or conditions: - condition: trigger id: - Urlaub ist beendet - condition: and # im Video fehlte diese logische & Verknüpfung mit dem Zustand des Urlaubsmodus conditions: - condition: trigger id: - Es wird nun geschlafen - condition: state entity_id: input_boolean.urlaubsmodus state: "on" then: - service: light.turn_off metadata: {} data: {} target: entity_id: - light.lichtergruppe1 - light.lichtergruppe2 mode: restart
alias: Video_Präsenzsimulation_Urlaub
description: ""
trigger:
  - platform: sun
    event: sunset
    offset: "-00:30:00"
  - platform: state
    entity_id:
      - input_boolean.urlaubsmodus
    to: "off"
    id: Urlaub ist beendet
  - platform: time
    at: "23:00:00"
    id: Es ist 23 Uhr
condition: []
action:
  - repeat:
      sequence:
        - service: light.turn_off
          metadata: {}
          data: {}
          target:
            entity_id: light.lichtergruppe1
        - delay:
            minutes: "{{ range(2,5) | random }}"
        - service: light.turn_on
          metadata: {}
          data_template:
            entity_id: |
              {{ state_attr('light.lichtergruppe1','entity_id') | random }}
        - delay:
            minutes: "{{ range(2,5) | random }}"
        - service: light.turn_off
          metadata: {}
          data: {}
          target:
            entity_id: light.lichtergruppe2
        - delay:
            minutes: "{{ range(2,5) | random }}"
        - service: light.turn_on
          metadata: {}
          data_template:
            entity_id: |
              {{ state_attr('light.lichtergruppe2','entity_id') | random }}
      while:
        - condition: and
          conditions:
            - condition: time
              before: "23:00:00"
            - condition: state
              entity_id: input_boolean.urlaubsmodus
              state: "on"
  - if:
      - condition: or
        conditions:
          - condition: trigger
            id:
              - Urlaub ist beendet
          - condition: and # im Video fehlte diese logische & Verknüpfung mit dem Zustand des Urlaubsmodus
            conditions:
              - condition: trigger
                id:
                  - Es wird nun geschlafen
              - condition: state
                entity_id: input_boolean.urlaubsmodus
                state: "on"
    then:
      - service: light.turn_off
        metadata: {}
        data: {}
        target:
          entity_id:
            - light.lichtergruppe1
            - light.lichtergruppe2
mode: restart

Wie du HACS installierst um die Integration von Simon zu nutzen, findest zu hier:

YouTube player

Simon vom Kanal Simon42 hat die HACS Integration Presence Simulation vorgestellt. Vielleicht eine alternative Lösung für Euch.

YouTube player

Camper-Upgrade: Mit Home Assistant zum smarten Reiseerlebnis! Interesse geweckt?

YouTube player

Willst du deinen Camping-Urlaub auf ein neues Level bringen? In diesem Video brauche ich deine Unterstützung! Ich plane, einen Camper – sei es ein Wohnwagen oder Wohnmobil – mit Home Assistant und verschiedenen Sensoren intelligent zu machen. Doch bevor ich starte, möchte ich wissen: Interessiert dich das? Lass es mich in den Kommentaren auf meinem Youtube Kanal https://www.youtube.com/@smarthome_more wissen und lass uns gemeinsam dieses aufregende Projekt angehen!

Ich möchte euch heute einen allgemeinen Amazon-Link teilen, über den ihr eine Vielzahl von Produkten entdecken könnt. Egal, ob ihr nach Smart Home-Geräten, Gadgets oder anderen nützlichen Artikeln sucht, Amazon hat für jeden etwas zu bieten.

Wenn ihr über diesen Link einkauft, unterstützt ihr meinen Kanal, ohne dass es für euch zusätzliche Kosten verursacht. Das hilft mir, weiterhin spannende Inhalte für euch zu erstellen!

Hier ist der Link zu Amazon: https://amzn.to/3KsGngK

In meinem Shop findest du interessante Produkte *

Home Assistant: Die Zukunft enthüllen: Prognosedaten ohne Grafana visualisieren!

Willst du der Zukunft einen Schritt voraus sein? Dann ist jetzt deine Gelegenheit! Mit Home Assistant und der Apex Chart Card kannst du tiefer in die Welt der Prognosedaten eintauchen – und das alles ohne Grafana! Keine langwierigen Konfigurationen mehr, keine Grafiken, die dich überfordern. Nur klare, präzise Vorhersagen direkt in deinem Smart-Home-Setup. Entdecke die mächtige Kombination von Technologie und Vorhersage und gestalte deine Zukunft – einfacher als je zuvor. Verpasse nicht diese Chance, deinen Alltag zu revolutionieren und dich an die Spitze zu katapultieren!

Ich möchte euch heute einen allgemeinen Amazon-Link teilen, über den ihr eine Vielzahl von Produkten entdecken könnt. Egal, ob ihr nach Smart Home-Geräten, Gadgets oder anderen nützlichen Artikeln sucht, Amazon hat für jeden etwas zu bieten.

Wenn ihr über diesen Link einkauft, unterstützt ihr meinen Kanal, ohne dass es für euch zusätzliche Kosten verursacht. Das hilft mir, weiterhin spannende Inhalte für euch zu erstellen!

Hier ist der Link zu Amazon: https://amzn.to/3KsGngK

ACHTUNG: Für alle, die die Solcast Solar Integration verwendet haben eine wichtige Information. Die Integration wurde vom Entwickler von GitHub gelöscht. D.h. sie steht zum jetzigen Zeitpunkt 04.06.2024 nicht mehr zur Verfügung. Dieses Video kann allerdings genauso Forecastdaten anderer Integrationen verwenden. Wenn Interesse besteht, kann ich gerne bei Gelegenheit die Beispiele auf eine alternative Variante anpassen. Gebt mir dazu in meinen Kommentaren eine kurze Rückmeldung. Wenn genügend Meldungen existieren, werde ich die Beispiele auf einen anderen Forecastdienst verändern.

Wie du Forecast Daten z.B. von Solcast verarbeitest , wird im Video erläutert. Neben Solcast Forecast Daten ist es auch möglich sich Wetterforecast Daten zu generieren. Ab der Version Home Assistant 2024.3 hat sich einiges im Umgang mit Forecast Informationen bei Wetterdaten geändert. Wie man sich mit der neuen Variante einen Template Sensor erstellt, hat Simon vom Kanal Simon42 an einigen Beispielen erläutert.

YouTube player
In diesem Video wird auf die Erstellung von Forecast Daten nach der neuen Variante eingegangen und Code -Beispiele erläutert, die als Basis für einen Wetterforecast Template dienen können. Die Daten müssten noch für einen Forecast mit einem Stundenraster innerhalb von 24h aufbereitet werden. Aber alle nötigen Basics dazu werden in diesem Video vermittelt.

Weiterführende Infos und auch den dazugehörigen YAML Code, findet ihr auf seiner Blog-Seite: https://www.simon42.com/home-assistan…

Um ApexCharts Card zu nutzen, benötigt ihr HACS. Hier findet ihr einige Videos, die euch den Einrichtungsprozess erläutern:

YouTube player
YouTube player
Kanal von: Simon42 – HACS Installation
YouTube player
Kanal von : SteuerdeinLeben – HACS Installation

Hier findet ihr die Blogseite von SteuerdeinLeben-Blog

ApexCharts-Kartenkonfiguration – Code – Snippet

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
type: custom:apexcharts-card
apex_config:
chart:
height: 400px
all_series_config:
unit: kWh
header:
title: Solar Forecast
show: true
standard_format: true
show_states: true
colorize_states: true
graph_span: 2d
span:
start: day
offset: '+0'
now:
show: true
label: Jetzt
yaxis:
- id: kwh
min: 0
apex_config:
tickAmount: 5
- id: header
show: false
series:
- entity: sensor.solcast_pv_forecast_prognose_heute
yaxis_id: kwh
type: line
name: Forecast heute
color: yellow
data_generator: |
return entity.attributes.detailedForecast.map((start, index) => {
return [new Date(start["period_start"]).getTime(), entity.attributes.detailedForecast[index]["pv_estimate10"]];
});
show:
legend_value: false
in_header: false
stroke_width: 4
float_precision: 2
extend_to: false
- entity: sensor.evcc_pv_power
transform: return x / 1000.00
yaxis_id: kwh
type: area
name: PV
color: green
show:
legend_value: false
in_header: false
stroke_width: 2
float_precision: 2
extend_to: false
group_by:
func: avg
- entity: sensor.solcast_pv_forecast_prognose_morgen
yaxis_id: kwh
type: line
name: Forecast morgen
color: yellow
data_generator: |
return entity.attributes.detailedForecast.map((start, index) => {
return [new Date(start["period_start"]).getTime(), entity.attributes.detailedForecast[index]["pv_estimate10"]];
});
show:
legend_value: false
in_header: false
stroke_width: 4
float_precision: 2
extend_to: false
- entity: sensor.solcast_pv_forecast_prognose_heute
yaxis_id: header
name: Heute
color: orange
show:
legend_value: true
in_header: true
in_chart: false
- entity: sensor.solcast_pv_forecast_prognose_verbleibende_leistung_heute
yaxis_id: header
name: Verbleibend
color: orange
show:
legend_value: true
in_header: true
in_chart: false
- entity: sensor.solcast_pv_forecast_prognose_morgen
yaxis_id: header
name: Morgen
color: grey
show:
legend_value: true
in_header: true
in_chart: false
- entity: sensor.sum_evcc_pv_energie_heute
yaxis_id: header
name: PV heute
color: green
show:
legend_value: true
in_header: true
in_chart: false
type: custom:apexcharts-card apex_config: chart: height: 400px all_series_config: unit: kWh header: title: Solar Forecast show: true standard_format: true show_states: true colorize_states: true graph_span: 2d span: start: day offset: '+0' now: show: true label: Jetzt yaxis: - id: kwh min: 0 apex_config: tickAmount: 5 - id: header show: false series: - entity: sensor.solcast_pv_forecast_prognose_heute yaxis_id: kwh type: line name: Forecast heute color: yellow data_generator: | return entity.attributes.detailedForecast.map((start, index) => { return [new Date(start["period_start"]).getTime(), entity.attributes.detailedForecast[index]["pv_estimate10"]]; }); show: legend_value: false in_header: false stroke_width: 4 float_precision: 2 extend_to: false - entity: sensor.evcc_pv_power transform: return x / 1000.00 yaxis_id: kwh type: area name: PV color: green show: legend_value: false in_header: false stroke_width: 2 float_precision: 2 extend_to: false group_by: func: avg - entity: sensor.solcast_pv_forecast_prognose_morgen yaxis_id: kwh type: line name: Forecast morgen color: yellow data_generator: | return entity.attributes.detailedForecast.map((start, index) => { return [new Date(start["period_start"]).getTime(), entity.attributes.detailedForecast[index]["pv_estimate10"]]; }); show: legend_value: false in_header: false stroke_width: 4 float_precision: 2 extend_to: false - entity: sensor.solcast_pv_forecast_prognose_heute yaxis_id: header name: Heute color: orange show: legend_value: true in_header: true in_chart: false - entity: sensor.solcast_pv_forecast_prognose_verbleibende_leistung_heute yaxis_id: header name: Verbleibend color: orange show: legend_value: true in_header: true in_chart: false - entity: sensor.solcast_pv_forecast_prognose_morgen yaxis_id: header name: Morgen color: grey show: legend_value: true in_header: true in_chart: false - entity: sensor.sum_evcc_pv_energie_heute yaxis_id: header name: PV heute color: green show: legend_value: true in_header: true in_chart: false
type: custom:apexcharts-card
apex_config:
  chart:
    height: 400px
all_series_config:
  unit: kWh
header:
  title: Solar Forecast
  show: true
  standard_format: true
  show_states: true
  colorize_states: true
graph_span: 2d
span:
  start: day
  offset: '+0'
now:
  show: true
  label: Jetzt
yaxis:
  - id: kwh
    min: 0
    apex_config:
      tickAmount: 5
  - id: header
    show: false
series:
  - entity: sensor.solcast_pv_forecast_prognose_heute
    yaxis_id: kwh
    type: line
    name: Forecast heute
    color: yellow
    data_generator: |
      return entity.attributes.detailedForecast.map((start, index) => {
        return [new Date(start["period_start"]).getTime(), entity.attributes.detailedForecast[index]["pv_estimate10"]];
      });
    show:
      legend_value: false
      in_header: false
    stroke_width: 4
    float_precision: 2
    extend_to: false
  - entity: sensor.evcc_pv_power
    transform: return x / 1000.00
    yaxis_id: kwh
    type: area
    name: PV
    color: green
    show:
      legend_value: false
      in_header: false
    stroke_width: 2
    float_precision: 2
    extend_to: false
    group_by:
      func: avg
  - entity: sensor.solcast_pv_forecast_prognose_morgen
    yaxis_id: kwh
    type: line
    name: Forecast morgen
    color: yellow
    data_generator: |
      return entity.attributes.detailedForecast.map((start, index) => {
        return [new Date(start["period_start"]).getTime(), entity.attributes.detailedForecast[index]["pv_estimate10"]];
      });
    show:
      legend_value: false
      in_header: false
    stroke_width: 4
    float_precision: 2
    extend_to: false
  - entity: sensor.solcast_pv_forecast_prognose_heute
    yaxis_id: header
    name: Heute
    color: orange
    show:
      legend_value: true
      in_header: true
      in_chart: false
  - entity: sensor.solcast_pv_forecast_prognose_verbleibende_leistung_heute
    yaxis_id: header
    name: Verbleibend
    color: orange
    show:
      legend_value: true
      in_header: true
      in_chart: false
  - entity: sensor.solcast_pv_forecast_prognose_morgen
    yaxis_id: header
    name: Morgen
    color: grey
    show:
      legend_value: true
      in_header: true
      in_chart: false
  - entity: sensor.sum_evcc_pv_energie_heute
    yaxis_id: header
    name: PV heute
    color: green
    show:
      legend_value: true
      in_header: true
      in_chart: false

EVCC-Daten nutzen: Effizientes Energiedashboard für Home Assistant

Erweitere dein Zuhause mit einem interaktiven Energiedashboard! Verwende die leistungsstarken Daten von EVCC, integriere MQTT-Sensoren für Echtzeitinformationen und optimiere mit Riemann-Integralen. Mit der Integration von EVCC bist du nicht mehr an einen bestimmten Batteriespeicher gebunden. Egal welche Art von Energiemessung du verwendest oder ob du von einem dynamischen Stromtarif profitierst – alles wird nahtlos durch EVCC abgedeckt. Diese Flexibilität ermöglicht es dir, deine Energieeffizienz unabhängig von den spezifischen Details deines Systems zu optimieren. So kannst du dein Energiedashboard in Home Assistant vollständig an deine Bedürfnisse anpassen und von einer umfassenden Überwachung und Steuerung deines Energieverbrauchs profitieren. Zusätzlich bieten dir hilfreiche Helfer eine benutzerfreundliche Erfahrung und unterstützen dich bei der Überwachung und Steuerung deines Energieverbrauchs. Mit dieser innovativen Lösung behältst du stets den Überblick über deine Energieeffizienz und kannst deine Ressourcen effektiv verwalten.

Ich möchte euch heute einen allgemeinen Amazon-Link teilen, über den ihr eine Vielzahl von Produkten entdecken könnt. Egal, ob ihr nach Smart Home-Geräten, Gadgets oder anderen nützlichen Artikeln sucht, Amazon hat für jeden etwas zu bieten.

Wenn ihr über diesen Link einkauft, unterstützt ihr meinen Kanal, ohne dass es für euch zusätzliche Kosten verursacht. Das hilft mir, weiterhin spannende Inhalte für euch zu erstellen!

Hier ist der Link zu Amazon: https://amzn.to/3KsGngK

Wenn du dich nicht nur für das Energie Dashboard, sondern auch dafür interessiert, wie das mit EVCC funktioniert, würde ich dir empfehlen auch die Grundlagenvideos zu EVCC und MQTT Sensoren zu betrachten:

YouTube player
Installation von EVCC
YouTube player
Wie erstelle ich einen MQTT Sensor

Weitere Informationen zum EVCC-Projekt und auch eine sehr gute Dokumentation könnt ihr unter folgender Adresse finden:

https://evcc.io/

Im folgenden Code Abschnitt findest du alle nötigen MQTT Sensoren für das Energie Dashboard:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
mqtt:
sensor:
- name: "EVCC Grid Power"
unique_id: evcc_grid_power
state_topic: "evcc/site/gridPower"
unit_of_measurement: "W"
availability_topic: "evcc/status"
device_class: power
- name: "EVCC PV Power"
unique_id: evcc_pv_power
state_topic: "evcc/site/pvPower"
#value_template: "{{ value | round(1) }}"
unit_of_measurement: "W"
availability_topic: "evcc/status"
device_class: power
- name: "EVCC Tariff Grid"
unique_id: evcc_tariff_grid
state_topic: "evcc/site/tariffGrid"
unit_of_measurement: "EUR/kWh"
availability_topic: "evcc/status"
- name: "EVCC geladen an Wallbox"
unique_id: evcc_geladen_an_Wallbox
state_topic: "evcc/site/statistics/total/chargedKWh"
unit_of_measurement: "kWh"
availability_topic: "evcc/status"
device_class: energy
state_class: total_increasing
- name: "EVCC Hausverbrauch"
unique_id: evcc_hausverbrauch
state_topic: "evcc/site/homePower"
unit_of_measurement: "W"
availability_topic: "evcc/status"
device_class: power
- name: "EVCC Battery Power"
unique_id: evcc_battery_Power
state_topic: "evcc/site/batteryPower"
unit_of_measurement: "W"
availability_topic: "evcc/status"
mqtt: sensor: - name: "EVCC Grid Power" unique_id: evcc_grid_power state_topic: "evcc/site/gridPower" unit_of_measurement: "W" availability_topic: "evcc/status" device_class: power - name: "EVCC PV Power" unique_id: evcc_pv_power state_topic: "evcc/site/pvPower" #value_template: "{{ value | round(1) }}" unit_of_measurement: "W" availability_topic: "evcc/status" device_class: power - name: "EVCC Tariff Grid" unique_id: evcc_tariff_grid state_topic: "evcc/site/tariffGrid" unit_of_measurement: "EUR/kWh" availability_topic: "evcc/status" - name: "EVCC geladen an Wallbox" unique_id: evcc_geladen_an_Wallbox state_topic: "evcc/site/statistics/total/chargedKWh" unit_of_measurement: "kWh" availability_topic: "evcc/status" device_class: energy state_class: total_increasing - name: "EVCC Hausverbrauch" unique_id: evcc_hausverbrauch state_topic: "evcc/site/homePower" unit_of_measurement: "W" availability_topic: "evcc/status" device_class: power - name: "EVCC Battery Power" unique_id: evcc_battery_Power state_topic: "evcc/site/batteryPower" unit_of_measurement: "W" availability_topic: "evcc/status"
mqtt: 
  sensor:
   - name: "EVCC Grid Power"
     unique_id: evcc_grid_power
     state_topic: "evcc/site/gridPower"
     unit_of_measurement: "W"
     availability_topic: "evcc/status"
     device_class: power
     
   - name: "EVCC PV Power"
     unique_id: evcc_pv_power
     state_topic: "evcc/site/pvPower"
     #value_template: "{{ value | round(1) }}"
     unit_of_measurement: "W"
     availability_topic: "evcc/status"
     device_class: power

   - name: "EVCC Tariff Grid"
     unique_id: evcc_tariff_grid
     state_topic: "evcc/site/tariffGrid"
     unit_of_measurement: "EUR/kWh"
     availability_topic: "evcc/status"
     
   - name: "EVCC geladen an Wallbox"
     unique_id: evcc_geladen_an_Wallbox
     state_topic: "evcc/site/statistics/total/chargedKWh"
     unit_of_measurement: "kWh"
     availability_topic: "evcc/status"
     device_class: energy
     state_class: total_increasing

   - name: "EVCC Hausverbrauch"
     unique_id: evcc_hausverbrauch
     state_topic: "evcc/site/homePower"
     unit_of_measurement: "W"
     availability_topic: "evcc/status"
     device_class: power
     
   - name: "EVCC Battery Power"
     unique_id: evcc_battery_Power
     state_topic: "evcc/site/batteryPower"
     unit_of_measurement: "W"
     availability_topic: "evcc/status"

Du benötigst weiterhin noch folgende Helfer Template Sensoren:

evcc_batterie_entladen

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
{% if float(states.sensor.evcc_battery_power.state) >= 0.0 %}
{{ float(states.sensor.evcc_battery_power.state) | abs }}
{% else %}
{{ float(0.0) }}
{% endif %}
{% if float(states.sensor.evcc_battery_power.state) >= 0.0 %} {{ float(states.sensor.evcc_battery_power.state) | abs }} {% else %} {{ float(0.0) }} {% endif %}
{% if float(states.sensor.evcc_battery_power.state) >= 0.0 %}
{{ float(states.sensor.evcc_battery_power.state) | abs }}
{% else %}
{{ float(0.0) }}
{% endif %}

evcc_Batterie_laden

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
{% if float(states.sensor.evcc_battery_power.state) <= 0.0 %}
{{ float(states.sensor.evcc_battery_power.state) | abs }}
{% else %}
{{ float(0.0) }}
{% endif %}
{% if float(states.sensor.evcc_battery_power.state) <= 0.0 %} {{ float(states.sensor.evcc_battery_power.state) | abs }} {% else %} {{ float(0.0) }} {% endif %}
{% if float(states.sensor.evcc_battery_power.state) <= 0.0 %}
{{ float(states.sensor.evcc_battery_power.state) | abs }}
{% else %}
{{ float(0.0) }}
{% endif %}

evcc_Netzbezug

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
{% if float(states.sensor.evcc_grid_power.state) > 0.0 %}
{{ float(states.sensor.evcc_grid_power.state) | abs }}
{% else %}
{{ float(0.0) }}
{% endif %}
{% if float(states.sensor.evcc_grid_power.state) > 0.0 %} {{ float(states.sensor.evcc_grid_power.state) | abs }} {% else %} {{ float(0.0) }} {% endif %}
{% if float(states.sensor.evcc_grid_power.state) > 0.0 %}
{{ float(states.sensor.evcc_grid_power.state) | abs }}
{% else %}
{{ float(0.0) }}
{% endif %}

evcc_Netzeinspeisung

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
{% if float(states.sensor.evcc_grid_power.state) <= 0.0 %}
{{ float(states.sensor.evcc_grid_power.state) | abs }}
{% else %}
{{ float(0.0) }}
{% endif %}
{% if float(states.sensor.evcc_grid_power.state) <= 0.0 %} {{ float(states.sensor.evcc_grid_power.state) | abs }} {% else %} {{ float(0.0) }} {% endif %}
{% if float(states.sensor.evcc_grid_power.state) <= 0.0 %}
{{ float(states.sensor.evcc_grid_power.state) | abs }}
{% else %}
{{ float(0.0) }}
{% endif %}

Die Riemann Summenintegralsensoren sind wie folgt unter den Helfern anzulegen:

(Die jeweiligen Eingangsvariablen sind die als Helfer angelegten evcc-Template Sensoren)

Effizientes Home Assistant Management: DB komprimieren & Struktur optimieren

Frühling ist perfekt für eine Home-Assistant-Auffrischung! Entdecke in diesem Video einfache Schritte, um deine Datenbank zu optimieren und deine configuration.yaml zu organisieren. Hol dir das Beste aus deinem Smart-Home-Setup heraus und genieße eine reibungslose Steuerung deiner Geräte. Lass uns gemeinsam dein Zuhause smarter machen!

Ich möchte euch heute einen allgemeinen Amazon-Link teilen, über den ihr eine Vielzahl von Produkten entdecken könnt. Egal, ob ihr nach Smart Home-Geräten, Gadgets oder anderen nützlichen Artikeln sucht, Amazon hat für jeden etwas zu bieten.

Wenn ihr über diesen Link einkauft, unterstützt ihr meinen Kanal, ohne dass es für euch zusätzliche Kosten verursacht. Das hilft mir, weiterhin spannende Inhalte für euch zu erstellen!

Hier ist der Link zu Amazon: https://amzn.to/3KsGngK

Link zur Dokumentation der Packages Integration:

Packages – Home Assistant (home-assistant.io)

Beispielautomatisierung Info Datenbankspeichergröße

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
alias: Test_Speicherbedarf
description: ""
trigger:
- platform: numeric_state
entity_id:
- sensor.home_assistant_v2_db_grosse
above: 5000
condition: []
action:
- service: notify.persistent_notification
metadata: {}
data:
message: >-
Der Speicher der Datenbank hat die 5000 MB überschritten. Bitte Wartung
vornehmen
mode: single
alias: Test_Speicherbedarf description: "" trigger: - platform: numeric_state entity_id: - sensor.home_assistant_v2_db_grosse above: 5000 condition: [] action: - service: notify.persistent_notification metadata: {} data: message: >- Der Speicher der Datenbank hat die 5000 MB überschritten. Bitte Wartung vornehmen mode: single
alias: Test_Speicherbedarf
description: ""
trigger:
  - platform: numeric_state
    entity_id:
      - sensor.home_assistant_v2_db_grosse
    above: 5000
condition: []
action:
  - service: notify.persistent_notification
    metadata: {}
    data:
      message: >-
        Der Speicher der Datenbank hat die 5000 MB überschritten. Bitte Wartung
        vornehmen
mode: single

Configuration.Yaml ( Packages)

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
homeassistant:
packages: !include_dir_named includes
allowlist_external_dirs:
- /config
homeassistant: packages: !include_dir_named includes allowlist_external_dirs: - /config
homeassistant:
  packages: !include_dir_named includes
  allowlist_external_dirs:
    - /config

Home Assistant: Dein Dashboard mit Card-Mod 3 individueller gestalten

Entdecke, wie du mit Home Assistant und Card-Mod dein Smart Home Dashboard individualisierst! Dieses Tutorial führt dich durch die Anpassung deiner Oberfläche an deine Bedürfnisse, von Geräten bis hin zum Erscheinungsbild. Das Video zeigt dir Schritt für Schritt die Verwendung der HACS Erweiterung Card-Mod in Kombination mit Templates um das Beste aus deinem Setup herauszuholen.

Links: Card-Mod3 : https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins

Ich möchte euch heute einen allgemeinen Amazon-Link teilen, über den ihr eine Vielzahl von Produkten entdecken könnt. Egal, ob ihr nach Smart Home-Geräten, Gadgets oder anderen nützlichen Artikeln sucht, Amazon hat für jeden etwas zu bieten.

Wenn ihr über diesen Link einkauft, unterstützt ihr meinen Kanal, ohne dass es für euch zusätzliche Kosten verursacht. Das hilft mir, weiterhin spannende Inhalte für euch zu erstellen!

Hier ist der Link zu Amazon: https://amzn.to/3KsGngK

Wie du HACS installierst wird dir in diesem Video erklärt:

YouTube player

YAML Code:

Farbe Namen:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
type: entities
entities:
- entity: input_boolean.schalter1
card_mod:
style: |
:host {
color: red;
}
- entity: input_boolean.schalter1
card_mod:
style: |
:host {
color: green;
}
- entity: input_boolean.schalter1
title: Farbe von Entitätsnamen
type: entities entities: - entity: input_boolean.schalter1 card_mod: style: | :host { color: red; } - entity: input_boolean.schalter1 card_mod: style: | :host { color: green; } - entity: input_boolean.schalter1 title: Farbe von Entitätsnamen
type: entities
entities:
  - entity: input_boolean.schalter1
    card_mod:
      style: |
        :host {
         color: red;
        }
  - entity: input_boolean.schalter1
    card_mod:
      style: |
        :host {
         color: green;
        }
  - entity: input_boolean.schalter1
title: Farbe von Entitätsnamen

Farbe Icons:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
type: entities
entities:
- entity: input_boolean.schalter1
card_mod:
style: |
:host {
--card-mod-icon-color: red;
}
- entity: input_boolean.schalter1
card_mod:
style: |
:host {
--card-mod-icon-color: blue;
color: yellow
}
- entity: input_boolean.schalter1
title: Icon Farbe
card_mod:
style: |
ha-card {
background: gray;
}
type: entities entities: - entity: input_boolean.schalter1 card_mod: style: | :host { --card-mod-icon-color: red; } - entity: input_boolean.schalter1 card_mod: style: | :host { --card-mod-icon-color: blue; color: yellow } - entity: input_boolean.schalter1 title: Icon Farbe card_mod: style: | ha-card { background: gray; }
type: entities
entities:
  - entity: input_boolean.schalter1
    card_mod:
      style: |
        :host {
         --card-mod-icon-color: red;
        }
  - entity: input_boolean.schalter1
    card_mod:
      style: |
        :host {
         --card-mod-icon-color: blue;
         color: yellow
        }
  - entity: input_boolean.schalter1
title: Icon Farbe
card_mod:
  style: |
    ha-card {
    background: gray;
    }

Farbe Hintergrund:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
type: entities
entities:
- entity: input_boolean.schalter1
- entity: input_boolean.schalter1
- entity: input_boolean.schalter1
title: Background Color
card_mod:
style: |
ha-card {
background: orange;
}
type: entities entities: - entity: input_boolean.schalter1 - entity: input_boolean.schalter1 - entity: input_boolean.schalter1 title: Background Color card_mod: style: | ha-card { background: orange; }
type: entities
entities:
  - entity: input_boolean.schalter1
  - entity: input_boolean.schalter1
  - entity: input_boolean.schalter1
title: Background Color
card_mod:
  style: |
    ha-card {
    background: orange;
    }

Farbe , Icon, Schriftfarbe nach Zustand:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
type: entities
entities:
- entity: input_boolean.schalter1
card_mod:
style: |
:host {
{% if is_state('input_boolean.schalter1', 'on') %}
--card-mod-icon: mdi:light-switch;
--card-mod-icon-color: red;
{% else %}
--card-mod-icon: mdi:garage;
--card-mod-icon-color: green;
{% endif %}
}
- entity: input_boolean.schalter1
card_mod:
style: |
:host {
{% if is_state('input_boolean.schalter1', 'on') %}
--card-mod-icon: mdi:light-switch;
--card-mod-icon-color: red;
{% else %}
--card-mod-icon: mdi:light-switch-off;
--card-mod-icon-color: green;
{% endif %}
}
- entity: input_boolean.schalter1
title: Icon, Schrift, Background
type: entities entities: - entity: input_boolean.schalter1 card_mod: style: | :host { {% if is_state('input_boolean.schalter1', 'on') %} --card-mod-icon: mdi:light-switch; --card-mod-icon-color: red; {% else %} --card-mod-icon: mdi:garage; --card-mod-icon-color: green; {% endif %} } - entity: input_boolean.schalter1 card_mod: style: | :host { {% if is_state('input_boolean.schalter1', 'on') %} --card-mod-icon: mdi:light-switch; --card-mod-icon-color: red; {% else %} --card-mod-icon: mdi:light-switch-off; --card-mod-icon-color: green; {% endif %} } - entity: input_boolean.schalter1 title: Icon, Schrift, Background
type: entities
entities:
  - entity: input_boolean.schalter1
    card_mod:
      style: |
        :host {
         {% if is_state('input_boolean.schalter1', 'on') %}
          --card-mod-icon: mdi:light-switch;
          --card-mod-icon-color: red;
          {% else %}
          --card-mod-icon: mdi:garage;
          --card-mod-icon-color: green;
          {% endif %}
         
        }
  - entity: input_boolean.schalter1
    card_mod:
      style: |
        :host {
         {% if is_state('input_boolean.schalter1', 'on') %}
          --card-mod-icon: mdi:light-switch;
          --card-mod-icon-color: red;
          {% else %}
          --card-mod-icon: mdi:light-switch-off;
          --card-mod-icon-color: green;
          {% endif %}
         
        }
  - entity: input_boolean.schalter1
title: Icon, Schrift, Background

Farbe, Icon, Schriftfarbe nach numerischen Zustand:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
type: entities
entities:
- entity: input_number.number1
card_mod:
style: |
:host { {% if states('input_number.number1') | int <=50 %}
background: green;
--card-mod-icon: mdi:light-switch;
--card-mod-icon-color: orange
{% elif states('input_number.number1') | int >50 and states('input_number.number1') | int < 80 %}
background: yellow;
--card-mod-icon: mdi:garage-open;
{% elif states('input_number.number1') | int >= 80 %}
background: red;
{% endif %}
}
type: entities entities: - entity: input_number.number1 card_mod: style: | :host { {% if states('input_number.number1') | int <=50 %} background: green; --card-mod-icon: mdi:light-switch; --card-mod-icon-color: orange {% elif states('input_number.number1') | int >50 and states('input_number.number1') | int < 80 %} background: yellow; --card-mod-icon: mdi:garage-open; {% elif states('input_number.number1') | int >= 80 %} background: red; {% endif %} }
type: entities
entities:
  - entity: input_number.number1
    card_mod:
      style: |
        :host {  {% if states('input_number.number1') | int <=50  %}
          background: green;
          --card-mod-icon: mdi:light-switch;
          --card-mod-icon-color: orange
          {% elif states('input_number.number1') | int >50 and states('input_number.number1') | int < 80   %}
          background: yellow;
          --card-mod-icon: mdi:garage-open;
          {% elif states('input_number.number1') | int >= 80  %}
          background: red;
          {% endif %}

        }

Für eine „Tile“ Card müssen ein paar andere Variablen verwendet werden. An dieser Stelle herzlichen Dank an @chrannen für diese super Ergänzung 💙

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
type: tile
entity: ENTITÄT
card_mod:
style: |
ha-card {
{% if is_state("ENTITÄT", "on") %}
--tile-color:crimson !important;
--card-mod-icon: mdi:arrow-left-bold-box;
{% else %}
--tile-color:darkgreen !important;
--card-mod-icon: mdi:arrow-right-bold-box;
{% endif %}
}
type: tile entity: ENTITÄT card_mod: style: | ha-card { {% if is_state("ENTITÄT", "on") %} --tile-color:crimson !important; --card-mod-icon: mdi:arrow-left-bold-box; {% else %} --tile-color:darkgreen !important; --card-mod-icon: mdi:arrow-right-bold-box; {% endif %} }
type: tile
entity: ENTITÄT
card_mod:
  style: |
    ha-card {
      {% if is_state("ENTITÄT", "on") %}
        --tile-color:crimson !important;
        --card-mod-icon: mdi:arrow-left-bold-box;
      {% else %}  
        --tile-color:darkgreen !important;
        --card-mod-icon: mdi:arrow-right-bold-box;
      {% endif %}  
    }

die wichtigsten Unterschiede sind:

– statt „:host“ lautet der style „ha-card“

– hinter jede farbe muss der zusatz „!important;“

– statt „card-mod-icon-color“ muss „tile-color“ geschrieben werden

Zeit sparen mit Home Assistant: Kalenderereignisse für Smart-Home-Automatisierungen nutzen

Optimiere deine täglichen Abläufe, indem du Kalenderereignisse als Trigger für Automatisierungen in Home Assistant einsetzt. Verpasse nie wieder wichtige Termine – sei es ein Meeting oder ein Geburtstag. Dein Smart Home passt sich intelligent an deine Pläne an, sei es mit gedimmten Lichtern für ein Abendessen oder aktivierter Heizung bei deiner Rückkehr von der Arbeit. Entdecke eine neue Dimension des Wohnkomforts und spare Zeit mit Home Assistant.

Ich möchte euch heute einen allgemeinen Amazon-Link teilen, über den ihr eine Vielzahl von Produkten entdecken könnt. Egal, ob ihr nach Smart Home-Geräten, Gadgets oder anderen nützlichen Artikeln sucht, Amazon hat für jeden etwas zu bieten.

Wenn ihr über diesen Link einkauft, unterstützt ihr meinen Kanal, ohne dass es für euch zusätzliche Kosten verursacht. Das hilft mir, weiterhin spannende Inhalte für euch zu erstellen!

Hier ist der Link zu Amazon: https://amzn.to/3KsGngK

Beispielautomatisierung aus Video:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
alias: Kalender_Video
description: ""
trigger:
- platform: calendar
event: start
offset: "0:0:0"
entity_id: calendar.smarthomeandmore
id: StartEvent
- platform: calendar
event: end
offset: "0:0:0"
entity_id: calendar.smarthomeandmore
id: StopEvent
condition:
- condition: trigger
id:
- StartEvent
action:
- choose:
- conditions:
- condition: and
conditions:
- condition: template
value_template: "{{ '@Licht' in trigger.calendar_event.summary }}"
sequence:
- service: light.turn_on
metadata: {}
data: {}
target:
device_id: fbb93a7f058686a3b2f0591978fb3497
- conditions:
- condition: and
conditions:
- condition: template
value_template: "{{ '@Licht' in trigger.calendar_event.summary }}"
- condition: trigger
id:
- StopEvent
sequence:
- service: light.turn_off
target:
device_id:
- fbb93a7f058686a3b2f0591978fb3497
data: {}
mode: single
alias: Kalender_Video description: "" trigger: - platform: calendar event: start offset: "0:0:0" entity_id: calendar.smarthomeandmore id: StartEvent - platform: calendar event: end offset: "0:0:0" entity_id: calendar.smarthomeandmore id: StopEvent condition: - condition: trigger id: - StartEvent action: - choose: - conditions: - condition: and conditions: - condition: template value_template: "{{ '@Licht' in trigger.calendar_event.summary }}" sequence: - service: light.turn_on metadata: {} data: {} target: device_id: fbb93a7f058686a3b2f0591978fb3497 - conditions: - condition: and conditions: - condition: template value_template: "{{ '@Licht' in trigger.calendar_event.summary }}" - condition: trigger id: - StopEvent sequence: - service: light.turn_off target: device_id: - fbb93a7f058686a3b2f0591978fb3497 data: {} mode: single
alias: Kalender_Video
description: ""
trigger:
  - platform: calendar
    event: start
    offset: "0:0:0"
    entity_id: calendar.smarthomeandmore
    id: StartEvent
  - platform: calendar
    event: end
    offset: "0:0:0"
    entity_id: calendar.smarthomeandmore
    id: StopEvent
condition:
  - condition: trigger
    id:
      - StartEvent
action:
  - choose:
      - conditions:
          - condition: and
            conditions:
              - condition: template
                value_template: "{{ '@Licht' in trigger.calendar_event.summary }}"
        sequence:
          - service: light.turn_on
            metadata: {}
            data: {}
            target:
              device_id: fbb93a7f058686a3b2f0591978fb3497
      - conditions:
          - condition: and
            conditions:
              - condition: template
                value_template: "{{ '@Licht' in trigger.calendar_event.summary }}"
              - condition: trigger
                id:
                  - StopEvent
        sequence:
          - service: light.turn_off
            target:
              device_id:
                - fbb93a7f058686a3b2f0591978fb3497
            data: {}
mode: single

Mit Home Assistant Icons nach Zustand dynamisch ändern

Entdecken Sie die Vielfalt von Home Assistant in der Gestaltung dynamischer Icons basierend auf Zuständen. Erleben Sie die Vielseitigkeit mit zwei Beispielen: einem binären Templatesensor für eine variable Icon-Anzeige und einem Sensor, der den Zustand eines Garagentors mit integrierter Dienstausführungsfunktion enthält.

Links aus dem Video:

Pictogrammers Website mit Icons: https://pictogrammers.com/library/mdi/

Home Assistant Template Integration: https://www.home-assistant.io/integrations/template/

Home Assistant Template Cover : https://www.home-assistant.io/integrations/cover.template/

Beispiel Template Sensor (binary_sensor):

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
binary_sensor:
- platform: template
sensors:
garage:
friendly_name: Garage
value_template: "{{ states('binary_sensor.garagentorsensor_contact') }}"
unique_id: garage_id
icon_template: >
{% if is_state('binary_sensor.garagentorsensor_contact', 'on') %} mdi:garage-open
{% else %} mdi:garage
{% endif %}
binary_sensor: - platform: template sensors: garage: friendly_name: Garage value_template: "{{ states('binary_sensor.garagentorsensor_contact') }}" unique_id: garage_id icon_template: > {% if is_state('binary_sensor.garagentorsensor_contact', 'on') %} mdi:garage-open {% else %} mdi:garage {% endif %}
binary_sensor:
  - platform: template
    sensors:
      garage:
        friendly_name: Garage
        value_template: "{{ states('binary_sensor.garagentorsensor_contact') }}"
        unique_id: garage_id
        icon_template: >
          {% if is_state('binary_sensor.garagentorsensor_contact', 'on') %} mdi:garage-open
          {% else %} mdi:garage
          {% endif %}

Beispiel Template Sensor (cover):

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
cover:
- platform: template
covers:
garagen_tor:
friendly_name: Garagentor
unique_id: garagentor_id
value_template: "{{is_state('binary_sensor.garagentorsensor_contact', 'on' )}}"
open_cover:
service: input_boolean.toggle
data:
entity_id: input_boolean.garage_test
close_cover:
service: input_boolean.toggle
data:
entity_id: input_boolean.garage_test
icon_template: >
{% if is_state('binary_sensor.garagentorsensor_contact', 'on') %} mdi:garage-open
{% else %} mdi:garage
{% endif %}
cover: - platform: template covers: garagen_tor: friendly_name: Garagentor unique_id: garagentor_id value_template: "{{is_state('binary_sensor.garagentorsensor_contact', 'on' )}}" open_cover: service: input_boolean.toggle data: entity_id: input_boolean.garage_test close_cover: service: input_boolean.toggle data: entity_id: input_boolean.garage_test icon_template: > {% if is_state('binary_sensor.garagentorsensor_contact', 'on') %} mdi:garage-open {% else %} mdi:garage {% endif %}
cover:
- platform: template
  covers:
    garagen_tor:
      friendly_name: Garagentor
      unique_id: garagentor_id
      value_template: "{{is_state('binary_sensor.garagentorsensor_contact', 'on' )}}"
      open_cover:
        service: input_boolean.toggle
        data:
          entity_id: input_boolean.garage_test
      close_cover:
        service: input_boolean.toggle
        data:
          entity_id: input_boolean.garage_test
      icon_template: >
          {% if is_state('binary_sensor.garagentorsensor_contact', 'on') %} mdi:garage-open
          {% else %} mdi:garage
          {% endif %}