Home Assistant Templates: Startklar ins Smart Home mit einem einfachen Einstieg!

In diesem Video erlebt ihr den einfachen Einstieg in die Nutzung von Home Assistant Templates. Wir gehen Schritt für Schritt durch die Grundlagen von Templates bis zu einer unkomplizierten Beispielautomatisierung. Dies schafft eine solide Basis für zahlreiche weitere Automatisierungen mit Templates. Entdeckt jetzt die Welt der Smart Home Automatisierung!

Link zur Dokumentation von Home Assistant Templates: https://www.home-assistant.io/docs/configuration/templating/

Template Beispiel Temperatursensoren:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
{{ (float(states.sensor.temperatur_mia_temperature.state) + float(states.sensor.temperatur_mia_temperature.state) ) /2 }}
{{ (float(states.sensor.temperatur_mia_temperature.state) + float(states.sensor.temperatur_mia_temperature.state) ) /2 }}
{{ (float(states.sensor.temperatur_mia_temperature.state) + float(states.sensor.temperatur_mia_temperature.state) ) /2  }}

Template Beispiel Liste einer Gruppe mit allen ausgeschalteten Lichtern:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
{{ expand('light.gruppe_lichter_template') | selectattr("state","eq","off") | map(attribute="entity_id") | list }}
{{ expand('light.gruppe_lichter_template') | selectattr("state","eq","off") | map(attribute="entity_id") | list }}
{{ expand('light.gruppe_lichter_template') | selectattr("state","eq","off") | map(attribute="entity_id") | list }}

Template Beispiel Liste von allen Lichtern die eingeschaltet sind:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
{{ states.light | selectattr("state","eq","on") | map(attribute="entity_id") | list }}
{{ states.light | selectattr("state","eq","on") | map(attribute="entity_id") | list }}
{{ states.light | selectattr("state","eq","on") | map(attribute="entity_id") | list }}

Template Beispiel Anzahl aller Lichter die eingeschaltet sind:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
{{ states.light | selectattr("state","eq","on") | map(attribute="entity_id") | list | count }}
{{ states.light | selectattr("state","eq","on") | map(attribute="entity_id") | list | count }}
{{ states.light | selectattr("state","eq","on") | map(attribute="entity_id") | list | count }}

Komplette Automatisierung aus dem Video:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
alias: Video_Template_Beispiel
description: ""
trigger:
- platform: numeric_state
entity_id:
- sensor.entfernung_tobias_von_daheim
below: 0.2
condition: []
action:
- service: light.turn_on
data:
entity_id: >-
{{ expand('light.gruppe_lichter_template') |
selectattr("state","eq","off") | map(attribute="entity_id") | list }}
mode: single
alias: Video_Template_Beispiel description: "" trigger: - platform: numeric_state entity_id: - sensor.entfernung_tobias_von_daheim below: 0.2 condition: [] action: - service: light.turn_on data: entity_id: >- {{ expand('light.gruppe_lichter_template') | selectattr("state","eq","off") | map(attribute="entity_id") | list }} mode: single
alias: Video_Template_Beispiel
description: ""
trigger:
  - platform: numeric_state
    entity_id:
      - sensor.entfernung_tobias_von_daheim
    below: 0.2
condition: []
action:
  - service: light.turn_on
    data:
      entity_id: >-
        {{ expand('light.gruppe_lichter_template') |
        selectattr("state","eq","off") | map(attribute="entity_id") | list }}
mode: single

Template Beispiel Distanz Device Tracker zum Haus:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
{{ distance('device_tracker.iphone_von_tobias_4') | round(2)}}
{{ distance('device_tracker.iphone_von_tobias_4') | round(2)}}
{{ distance('device_tracker.iphone_von_tobias_4') | round(2)}}

Effektives Dimmen: 3 praktische Home Assistant Automatisierungen für deine Beleuchtung!

Entdecke die Magie der Lichtautomatisierung! In diesem Video zeige ich dir 3 faszinierende Wege, wie du das Dimmen von Lichtern mit nur einer Fernbedienung in deinem Smart Home automatisieren kannst. Tauche ein in die Welt der Beleuchtungshacks und erfahre, wie du mit Leichtigkeit die perfekte Atmosphäre in jedem Raum schaffst. Verpasse nicht die Gelegenheit, deinem Zuhause einen Hauch von Smartness zu verleihen – schau jetzt rein und erlebe, wie einfach es sein kann, Licht auf ein neues Level zu heben!

Meine ZigBee Produkte, die ich einsetze *:

Die Fernbedienung findet ihr hier:

STYRBAR Fernbedienung, smart Edelstahl – IKEA Deutschland

Links aus dem Video:

ZigBee2MQTT Devices: Home | Zigbee2MQTT

Automatisierung Dimmer_01:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
alias: Dimmer_01_Video
description: ""
trigger:
- platform: state
entity_id:
- sensor.remote_studio_action
to: "on"
id: "on"
- platform: state
entity_id:
- sensor.remote_studio_action
to: "off"
id: "off"
condition: []
action:
- if:
- condition: trigger
id:
- "on"
then:
- device_id: fbb93a7f058686a3b2f0591978fb3497
domain: light
entity_id: c4823f315d11423717ef48fe24a15196
type: brightness_increase
- if:
- condition: trigger
id:
- "off"
then:
- device_id: fbb93a7f058686a3b2f0591978fb3497
domain: light
entity_id: c4823f315d11423717ef48fe24a15196
type: brightness_decrease
mode: single
alias: Dimmer_01_Video description: "" trigger: - platform: state entity_id: - sensor.remote_studio_action to: "on" id: "on" - platform: state entity_id: - sensor.remote_studio_action to: "off" id: "off" condition: [] action: - if: - condition: trigger id: - "on" then: - device_id: fbb93a7f058686a3b2f0591978fb3497 domain: light entity_id: c4823f315d11423717ef48fe24a15196 type: brightness_increase - if: - condition: trigger id: - "off" then: - device_id: fbb93a7f058686a3b2f0591978fb3497 domain: light entity_id: c4823f315d11423717ef48fe24a15196 type: brightness_decrease mode: single
alias: Dimmer_01_Video
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.remote_studio_action
    to: "on"
    id: "on"
  - platform: state
    entity_id:
      - sensor.remote_studio_action
    to: "off"
    id: "off"
condition: []
action:
  - if:
      - condition: trigger
        id:
          - "on"
    then:
      - device_id: fbb93a7f058686a3b2f0591978fb3497
        domain: light
        entity_id: c4823f315d11423717ef48fe24a15196
        type: brightness_increase
  - if:
      - condition: trigger
        id:
          - "off"
    then:
      - device_id: fbb93a7f058686a3b2f0591978fb3497
        domain: light
        entity_id: c4823f315d11423717ef48fe24a15196
        type: brightness_decrease
mode: single

Automatisierung Dimmer_02:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
alias: Dimmer_02_Video
description: ""
trigger:
- platform: state
entity_id:
- sensor.remote_studio_action
to: brightness_move_up
id: brightness_move_up
- platform: state
entity_id:
- sensor.remote_studio_action
to: brightness_move_down
id: brightness_move_down
- platform: state
entity_id:
- sensor.remote_studio_action
to: brightness_stop
id: brightness_stop
condition: []
action:
- repeat:
sequence:
- if:
- condition: trigger
id:
- brightness_move_up
then:
- device_id: fbb93a7f058686a3b2f0591978fb3497
domain: light
entity_id: c4823f315d11423717ef48fe24a15196
type: brightness_increase
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 400
- if:
- condition: trigger
id:
- brightness_move_down
then:
- device_id: fbb93a7f058686a3b2f0591978fb3497
domain: light
entity_id: c4823f315d11423717ef48fe24a15196
type: brightness_decrease
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 400
while: []
mode: restart
alias: Dimmer_02_Video description: "" trigger: - platform: state entity_id: - sensor.remote_studio_action to: brightness_move_up id: brightness_move_up - platform: state entity_id: - sensor.remote_studio_action to: brightness_move_down id: brightness_move_down - platform: state entity_id: - sensor.remote_studio_action to: brightness_stop id: brightness_stop condition: [] action: - repeat: sequence: - if: - condition: trigger id: - brightness_move_up then: - device_id: fbb93a7f058686a3b2f0591978fb3497 domain: light entity_id: c4823f315d11423717ef48fe24a15196 type: brightness_increase - delay: hours: 0 minutes: 0 seconds: 0 milliseconds: 400 - if: - condition: trigger id: - brightness_move_down then: - device_id: fbb93a7f058686a3b2f0591978fb3497 domain: light entity_id: c4823f315d11423717ef48fe24a15196 type: brightness_decrease - delay: hours: 0 minutes: 0 seconds: 0 milliseconds: 400 while: [] mode: restart
alias: Dimmer_02_Video
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.remote_studio_action
    to: brightness_move_up
    id: brightness_move_up
  - platform: state
    entity_id:
      - sensor.remote_studio_action
    to: brightness_move_down
    id: brightness_move_down
  - platform: state
    entity_id:
      - sensor.remote_studio_action
    to: brightness_stop
    id: brightness_stop
condition: []
action:
  - repeat:
      sequence:
        - if:
            - condition: trigger
              id:
                - brightness_move_up
          then:
            - device_id: fbb93a7f058686a3b2f0591978fb3497
              domain: light
              entity_id: c4823f315d11423717ef48fe24a15196
              type: brightness_increase
            - delay:
                hours: 0
                minutes: 0
                seconds: 0
                milliseconds: 400
        - if:
            - condition: trigger
              id:
                - brightness_move_down
          then:
            - device_id: fbb93a7f058686a3b2f0591978fb3497
              domain: light
              entity_id: c4823f315d11423717ef48fe24a15196
              type: brightness_decrease
            - delay:
                hours: 0
                minutes: 0
                seconds: 0
                milliseconds: 400
      while: []
mode: restart

Automatisierung Dimmer_03 :

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
alias: Dimmer_03_Video
description: ""
trigger:
- platform: state
entity_id:
- sensor.remote_studio_action
to: brightness_move_up
id: brightness_move_up
- platform: state
entity_id:
- sensor.remote_studio_action
to: brightness_move_down
id: brightness_move_down
- platform: state
entity_id:
- sensor.remote_studio_action
to: brightness_stop
id: brightness_stop
condition: []
action:
- repeat:
sequence:
- if:
- condition: trigger
id:
- brightness_move_up
then:
- service: light.turn_on
metadata: {}
data:
brightness_step_pct: 1
target:
entity_id: light.buro_klavinova_oben
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 400
- if:
- condition: trigger
id:
- brightness_move_down
then:
- service: light.turn_on
metadata: {}
data:
brightness_step_pct: -1
target:
entity_id: light.buro_klavinova_oben
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 400
while: []
mode: restart
alias: Dimmer_03_Video description: "" trigger: - platform: state entity_id: - sensor.remote_studio_action to: brightness_move_up id: brightness_move_up - platform: state entity_id: - sensor.remote_studio_action to: brightness_move_down id: brightness_move_down - platform: state entity_id: - sensor.remote_studio_action to: brightness_stop id: brightness_stop condition: [] action: - repeat: sequence: - if: - condition: trigger id: - brightness_move_up then: - service: light.turn_on metadata: {} data: brightness_step_pct: 1 target: entity_id: light.buro_klavinova_oben - delay: hours: 0 minutes: 0 seconds: 0 milliseconds: 400 - if: - condition: trigger id: - brightness_move_down then: - service: light.turn_on metadata: {} data: brightness_step_pct: -1 target: entity_id: light.buro_klavinova_oben - delay: hours: 0 minutes: 0 seconds: 0 milliseconds: 400 while: [] mode: restart
alias: Dimmer_03_Video
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.remote_studio_action
    to: brightness_move_up
    id: brightness_move_up
  - platform: state
    entity_id:
      - sensor.remote_studio_action
    to: brightness_move_down
    id: brightness_move_down
  - platform: state
    entity_id:
      - sensor.remote_studio_action
    to: brightness_stop
    id: brightness_stop
condition: []
action:
  - repeat:
      sequence:
        - if:
            - condition: trigger
              id:
                - brightness_move_up
          then:
            - service: light.turn_on
              metadata: {}
              data:
                brightness_step_pct: 1
              target:
                entity_id: light.buro_klavinova_oben
            - delay:
                hours: 0
                minutes: 0
                seconds: 0
                milliseconds: 400
        - if:
            - condition: trigger
              id:
                - brightness_move_down
          then:
            - service: light.turn_on
              metadata: {}
              data:
                brightness_step_pct: -1
              target:
                entity_id: light.buro_klavinova_oben
            - delay:
                hours: 0
                minutes: 0
                seconds: 0
                milliseconds: 400
      while: []
mode: restart

Raspberry Pi 5 & Home Assistant: So gelingt die mühelose Installation (2024)!

Hinweis!:

Mittlerweile lässt sich das Image von Home Assistant über den Raspberry Pi Imager installieren, die Links aus dem Video sind nicht mehr gültig: https://www.raspberrypi.com/software/ Dort Raspberry Pi 5 auswählen, Bei Other specific-purpose OS Home Assistant selektieren und Home Assistant auswählen, dann noch die SD Karte selektieren und das Image wird auf die SD Karte gespielt. !!! VG Tobias

Hier findest du ein kurzes Video, welches den Vorgang erklärt:

YouTube player

Die volle Integration: Home Assistant OS mit ZigBee (ZHA) und HACS auf Raspberry Pi 5 installieren. In diesem Video begleite ich euch durch jeden Schritt, um eine vollständige Smart Home Zentrale zu schaffen. Entdeckt die Welt der Home Automation und erfahrt, wie ihr euer Zuhause mit Leichtigkeit auf das nächste Level bringt!

Den Raspberry Pi 5 könnt ihr hier bekommen *:

Diese Zigbee Komponenten habe ich im Einsatz*:

Für die Installation von HACS gib im Terminal folgenden Befehl ein:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
wget -O - https://get.hacs.xyz | bash -
wget -O - https://get.hacs.xyz | bash -
wget -O - https://get.hacs.xyz | bash -

Home Assistant Bedingungen: Umfassende Erklärung für effektive Automationen (2024)!

Meistere die Feinheiten von Home Assistant Bedingungen (Version 2024.x) in diesem detaillierten Video. Wir nehmen uns Zeit, die verschiedenen Zustände (UND, ODER, NICHT) anhand einer praxisnahen Beispielautomatisierung zu erklären. Vertiefe dein Verständnis für diese leistungsstarken Funktionen und optimiere deine Smart-Home-Automatisierungen. Schalte ein für eine umfassende Auseinandersetzung mit den Bedingungen in Home Assistant!

Diese ZigBee Produkte verwende ich * :

Beispielautomatisierung Bedingungen:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
alias: Bedingungen_Video
description: ""
trigger:
- platform: time_pattern
minutes: /1
condition:
- condition: and
conditions:
- condition: time
after: "10:00:00"
before: "20:00:00"
- condition: not
conditions:
- condition: numeric_state
entity_id: sensor.zeitlueftung
above: 1
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.helfer_luftungsfenster_im_haus
state: "off"
- condition: state
entity_id: input_boolean.helfer_luftungsbenachrichtung
state: "off"
action:
- service: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.helfer_luftungsbenachrichtung
- service: notify.notify
metadata: {}
data:
message: Es wurde heute noch nicht genug gelüftet
title: Lüftungsbenachtrichtigung
mode: single
alias: Bedingungen_Video description: "" trigger: - platform: time_pattern minutes: /1 condition: - condition: and conditions: - condition: time after: "10:00:00" before: "20:00:00" - condition: not conditions: - condition: numeric_state entity_id: sensor.zeitlueftung above: 1 - condition: or conditions: - condition: state entity_id: binary_sensor.helfer_luftungsfenster_im_haus state: "off" - condition: state entity_id: input_boolean.helfer_luftungsbenachrichtung state: "off" action: - service: input_boolean.turn_on metadata: {} data: {} target: entity_id: input_boolean.helfer_luftungsbenachrichtung - service: notify.notify metadata: {} data: message: Es wurde heute noch nicht genug gelüftet title: Lüftungsbenachtrichtigung mode: single
alias: Bedingungen_Video
description: ""
trigger:
  - platform: time_pattern
    minutes: /1
condition:
  - condition: and
    conditions:
      - condition: time
        after: "10:00:00"
        before: "20:00:00"
      - condition: not
        conditions:
          - condition: numeric_state
            entity_id: sensor.zeitlueftung
            above: 1
      - condition: or
        conditions:
          - condition: state
            entity_id: binary_sensor.helfer_luftungsfenster_im_haus
            state: "off"
      - condition: state
        entity_id: input_boolean.helfer_luftungsbenachrichtung
        state: "off"
action:
  - service: input_boolean.turn_on
    metadata: {}
    data: {}
    target:
      entity_id: input_boolean.helfer_luftungsbenachrichtung
  - service: notify.notify
    metadata: {}
    data:
      message: Es wurde heute noch nicht genug gelüftet
      title: Lüftungsbenachtrichtigung
mode: single

Beispielautomatisierung Helfer zurücksetzen:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
alias: Helfer Zurücksetzen
description: ""
trigger:
- platform: time
at: "00:00:00"
condition: []
action:
- service: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id: input_boolean.helfer_luftungsbenachrichtung
mode: single
alias: Helfer Zurücksetzen description: "" trigger: - platform: time at: "00:00:00" condition: [] action: - service: input_boolean.turn_off metadata: {} data: {} target: entity_id: input_boolean.helfer_luftungsbenachrichtung mode: single
alias: Helfer Zurücksetzen
description: ""
trigger:
  - platform: time
    at: "00:00:00"
condition: []
action:
  - service: input_boolean.turn_off
    metadata: {}
    data: {}
    target:
      entity_id: input_boolean.helfer_luftungsbenachrichtung
mode: single

Configuration.YAML ( History Stat )

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sensor:
- platform: history_stats
name: zeitlueftung
entity_id: binary_sensor.helfer_luftungsfenster_im_haus
state: "on"
type: time
start: "{{ now().replace(hour=0, minute=0, second=0) }}"
end: "{{ now() }}"
sensor: - platform: history_stats name: zeitlueftung entity_id: binary_sensor.helfer_luftungsfenster_im_haus state: "on" type: time start: "{{ now().replace(hour=0, minute=0, second=0) }}" end: "{{ now() }}"
sensor: 

  - platform: history_stats
    name: zeitlueftung
    entity_id: binary_sensor.helfer_luftungsfenster_im_haus
    state: "on"
    type: time
    start: "{{ now().replace(hour=0, minute=0, second=0) }}"
    end: "{{ now() }}"

Alle Home Assistant Auslöser/Trigger – Komplett erklärt !

In diesem Video erkläre ich euch alle Auslöser / Trigger . Dabei wird für fast jeden Auslöser auch ein Beispiel gezeigt. Es stellt den Anfang einer Automatisierungsreihe dar und soll euch dabei helfen die Möglichkeiten von Home Assistant kennenzulernen.

Die von mir verwendeten ZigBee Produkte findest du hier*:

Alle Auslöser im Überblick:

  • Gerät
  • Numerischer Zustand
  • Kalender
  • Sonnenaufgang/Sonnenuntergang
  • Zeit
  • Zeitraster
  • Zone
  • Dauerhafte Benachrichtigung
  • Ereignis/Event
  • Geolokalisierung
  • Home Assistant
  • Satz
  • Tag
  • Template Trigger
  • Webhook

Detaillierte Erläuterungen findet ihr auf der Home Assistant Webseite:

Automation Trigger – Home Assistant (home-assistant.io)

Zustände sichern & abrufen: So verfeinerst du Home Assistant Automatisierungen!

Optimiere deine Home Assistant Automatisierungen mit präziser Zustandswiederherstellung. In diesem Video erfährst du, wie du den Anfangszustand deiner Geräte, sei es Beleuchtung, Rollos oder andere, gezielt in Automatisierungen integrierst. Erlerne die Kunst der Feinabstimmung für ein perfektes und zuverlässiges Smart-Home-Erlebnis. Entdecke, wie du mit Home Assistant deine individuellen Anforderungen erfüllen kannst und ein maßgeschneidertes, effizientes Automatisierungssystem schaffst.

Diese ZigBee Produkte verwende ich * :

Die Automatisierungsbeispiele als YAML Code könnt ihr hier nochmal nachvollziehen.

Automatisierungsbeispiel 1 ( Rollosteuerung bei Wind):

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
alias: Rollosteuerung_bei_Wind
description: ""
trigger:
- platform: state
entity_id:
- input_boolean.wind
to: "on"
id: es ist windig
- platform: state
entity_id:
- input_boolean.wind
to: "off"
id: es ist nicht mehr windig
condition: []
action:
- if:
- condition: trigger
id:
- es ist windig
then:
- service: scene.create
data:
scene_id: zustandeliasrollos
snapshot_entities:
- cover.elia_rollo_links
- cover.elia_rollo_rechts
- service: cover.open_cover
target:
entity_id:
- cover.elia_rollo_links
- cover.elia_rollo_rechts
data: {}
- if:
- condition: trigger
id:
- es ist nicht mehr windig
then:
- service: scene.turn_on
target:
entity_id: scene.zustandeliasrollos
metadata: {}
mode: single
alias: Rollosteuerung_bei_Wind description: "" trigger: - platform: state entity_id: - input_boolean.wind to: "on" id: es ist windig - platform: state entity_id: - input_boolean.wind to: "off" id: es ist nicht mehr windig condition: [] action: - if: - condition: trigger id: - es ist windig then: - service: scene.create data: scene_id: zustandeliasrollos snapshot_entities: - cover.elia_rollo_links - cover.elia_rollo_rechts - service: cover.open_cover target: entity_id: - cover.elia_rollo_links - cover.elia_rollo_rechts data: {} - if: - condition: trigger id: - es ist nicht mehr windig then: - service: scene.turn_on target: entity_id: scene.zustandeliasrollos metadata: {} mode: single
alias: Rollosteuerung_bei_Wind
description: ""
trigger:
  - platform: state
    entity_id:
      - input_boolean.wind
    to: "on"
    id: es ist windig
  - platform: state
    entity_id:
      - input_boolean.wind
    to: "off"
    id: es ist nicht mehr windig
condition: []
action:
  - if:
      - condition: trigger
        id:
          - es ist windig
    then:
      - service: scene.create
        data:
          scene_id: zustandeliasrollos
          snapshot_entities:
            - cover.elia_rollo_links
            - cover.elia_rollo_rechts
      - service: cover.open_cover
        target:
          entity_id:
            - cover.elia_rollo_links
            - cover.elia_rollo_rechts
        data: {}
  - if:
      - condition: trigger
        id:
          - es ist nicht mehr windig
    then:
      - service: scene.turn_on
        target:
          entity_id: scene.zustandeliasrollos
        metadata: {}
mode: single

Automatisierungsbeispiel 2 ( Scene Save TV Lampe)

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
alias: Scene Save TV Lampe
description: ""
trigger:
- platform: state
entity_id:
- input_boolean.helfer_bewegungsmelder
to: "on"
condition: []
action:
- service: scene.create
data:
scene_id: zustandtvbeleuchtung
snapshot_entities:
- light.tv_bloom_eg_links
- light.tv_bloom_eg_rechts
- service: light.turn_on
target:
entity_id:
- light.tv_bloom_eg_links
- light.tv_bloom_eg_rechts
data:
brightness_pct: 100
rgb_color:
- 255
- 0
- 0
- delay:
hours: 0
minutes: 0
seconds: 15
milliseconds: 0
- service: scene.turn_on
target:
entity_id: scene.zustandtvbeleuchtung
metadata: {}
- service: scene.delete
data: {}
target:
entity_id: scene.zustandtvbeleuchtung
mode: single
alias: Scene Save TV Lampe description: "" trigger: - platform: state entity_id: - input_boolean.helfer_bewegungsmelder to: "on" condition: [] action: - service: scene.create data: scene_id: zustandtvbeleuchtung snapshot_entities: - light.tv_bloom_eg_links - light.tv_bloom_eg_rechts - service: light.turn_on target: entity_id: - light.tv_bloom_eg_links - light.tv_bloom_eg_rechts data: brightness_pct: 100 rgb_color: - 255 - 0 - 0 - delay: hours: 0 minutes: 0 seconds: 15 milliseconds: 0 - service: scene.turn_on target: entity_id: scene.zustandtvbeleuchtung metadata: {} - service: scene.delete data: {} target: entity_id: scene.zustandtvbeleuchtung mode: single
alias: Scene Save TV Lampe
description: ""
trigger:
  - platform: state
    entity_id:
      - input_boolean.helfer_bewegungsmelder
    to: "on"
condition: []
action:
  - service: scene.create
    data:
      scene_id: zustandtvbeleuchtung
      snapshot_entities:
        - light.tv_bloom_eg_links
        - light.tv_bloom_eg_rechts
  - service: light.turn_on
    target:
      entity_id:
        - light.tv_bloom_eg_links
        - light.tv_bloom_eg_rechts
    data:
      brightness_pct: 100
      rgb_color:
        - 255
        - 0
        - 0
  - delay:
      hours: 0
      minutes: 0
      seconds: 15
      milliseconds: 0
  - service: scene.turn_on
    target:
      entity_id: scene.zustandtvbeleuchtung
    metadata: {}
  - service: scene.delete
    data: {}
    target:
      entity_id: scene.zustandtvbeleuchtung
mode: single

Mit Home Assistant jede alte Türklinkel smart machen

Mit Home Assistant und einem Sensor der Firma Aqara kann man fast jede ältere Türklingel smart machen. Dafür sind keine großen Umbaumaßnahmen erforderlich. Und es ist zudem noch sehr günstig.

Diese ZigBee Produkte verwende ich * :

Diesen Vibrationssensor habe ich verwendet * :

Sale
Aqara Vibrationssensor, Erfordert Aqara Hub, Zigbee-Verbindung, Drahtloser Mini-Glasbruchmelder für Alarmanlage und Smart Home, Kompatibel mit Apple HomeKit, IFTTT, DJT11LM
  • Hinweise: Dieses Gerät benötigt Aqara Hub für den Betrieb. Erfordert eine sichere 2,4-GHz-WLAN-Netzwerkverbindung. Ein Aqara Hub kann bis zu 32 Aqara Geräte verbinden
  • Vibrationserkennung: Immer, wenn der Aqara Vibrationssensor eine unerwartete Vibration erkennt, sendet er Warnungen an Ihr Telefon oder aktiviert den lokalen Alarm am Aqara Hub
  • Vielseitiger Bewegungssensor: Der Aqara Vibrationssensor kann auch Neigungs- und Fallbewegungen erkennen, wenn er an einem Objekt befestigt wird. Daher können Sie den Sensor an Ihren Wertsachen oder Schubladen anbringen und benachrichtigt werden, wenn Bewegungen vom Gerät erkannt werden
  • Smart Home: Der Aqara Vibrationssensor kann entwickelt werden, um andere an Aqara angeschlossene Geräte zu steuern und auszulösen, wenn Vibrationen und/oder Bewegungen erkannt werden
  • Einfache Installation: Keine Verkabelung oder Schrauben erforderlich

Türklingel Automatisierung

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
alias: Tuerklingel hat ausgelöst
description: ""
trigger:
- platform: state
entity_id:
- binary_sensor.tuerklingel_vibration
to: "on"
condition: []
action:
- service: notify.notify
data:
message: Es klingelt an der Tür!
title: Information
- service: notify.alexa_media_keller
data:
message: Es klingelt an der Tür!
title: Information
- service: camera.snapshot
target:
entity_id: camera.carport
data:
filename: /config/www/snapshot.jpg
mode: single
alias: Tuerklingel hat ausgelöst description: "" trigger: - platform: state entity_id: - binary_sensor.tuerklingel_vibration to: "on" condition: [] action: - service: notify.notify data: message: Es klingelt an der Tür! title: Information - service: notify.alexa_media_keller data: message: Es klingelt an der Tür! title: Information - service: camera.snapshot target: entity_id: camera.carport data: filename: /config/www/snapshot.jpg mode: single
alias: Tuerklingel hat ausgelöst
description: ""
trigger:
  - platform: state
    entity_id:
      - binary_sensor.tuerklingel_vibration
    to: "on"
condition: []
action:
  - service: notify.notify
    data:
      message: Es klingelt an der Tür!
      title: Information
  - service: notify.alexa_media_keller
    data:
      message: Es klingelt an der Tür!
      title: Information
  - service: camera.snapshot
    target:
      entity_id: camera.carport
    data:
      filename: /config/www/snapshot.jpg
mode: single

Configuration.yaml

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
camera:
- platform: local_file
name: camera_snapshot_haustuer
file_path: /config/www/snapshot.jpg
camera: - platform: local_file name: camera_snapshot_haustuer file_path: /config/www/snapshot.jpg
camera:
  - platform: local_file
    name: camera_snapshot_haustuer
    file_path: /config/www/snapshot.jpg

Home Assistant, Adaptive Steuerung von Lichtern

Möchte du deine Lichter auch in der Farbtemperatur und Helligkeit in Abhängigkeit vom Stand der Sonne, oder in einem definierten Zeitfenster steuern ? Die Home Assistant Integration Adaptive Lightning ermöglicht dir das auf einfacher Weise. Dieses Video zeigt dir die Installation und Konfiguration der Integration.

Die von mir verwendeten ZigBee Produkte* :

Links:

Adaptive Lighting: basnijholt/adaptive-lighting: Adaptive Lighting custom component for Home Assistant (github.com)

5 Home Assistant Automatisierungen für Einsteiger

Hier findest du 5 Automatisierungen für Einsteiger. Dabei werden Bewegungsmelder & Lichter, Zeitpläne, Helfer, Shortcuts und Temperaturthermostate verwendet. Diese 5 Beispiele sollen dir helfen, eigene Ideen in deinem smarten Heim umzusetzen.

Diese ZigBee Produkte verwende ich *:

Automatisierung 1:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
alias: Automatisierung 1
description: ""
trigger:
- platform: state
entity_id:
- binary_sensor.bewegungsmelder_flur_haustur_eg_occupancy
from: "off"
to: "on"
id: Bewegung ausgelöst
- platform: state
entity_id:
- binary_sensor.bewegungsmelder_flur_haustur_eg_occupancy
from: "on"
to: "off"
for:
hours: 0
minutes: 5
seconds: 0
id: Bewegungsmelder zurückgesetzt
condition: []
action:
- if:
- condition: trigger
id:
- Bewegung ausgelöst
then:
- service: light.turn_on
target:
entity_id: light.flur_eg_haustur_deckenlampe
data: {}
- if:
- condition: trigger
id:
- Bewegungsmelder zurückgesetzt
then:
- service: light.turn_off
target:
entity_id: light.flur_eg_haustur_deckenlampe
data: {}
mode: single
alias: Automatisierung 1 description: "" trigger: - platform: state entity_id: - binary_sensor.bewegungsmelder_flur_haustur_eg_occupancy from: "off" to: "on" id: Bewegung ausgelöst - platform: state entity_id: - binary_sensor.bewegungsmelder_flur_haustur_eg_occupancy from: "on" to: "off" for: hours: 0 minutes: 5 seconds: 0 id: Bewegungsmelder zurückgesetzt condition: [] action: - if: - condition: trigger id: - Bewegung ausgelöst then: - service: light.turn_on target: entity_id: light.flur_eg_haustur_deckenlampe data: {} - if: - condition: trigger id: - Bewegungsmelder zurückgesetzt then: - service: light.turn_off target: entity_id: light.flur_eg_haustur_deckenlampe data: {} mode: single
alias: Automatisierung 1
description: ""
trigger:
  - platform: state
    entity_id:
      - binary_sensor.bewegungsmelder_flur_haustur_eg_occupancy
    from: "off"
    to: "on"
    id: Bewegung ausgelöst
  - platform: state
    entity_id:
      - binary_sensor.bewegungsmelder_flur_haustur_eg_occupancy
    from: "on"
    to: "off"
    for:
      hours: 0
      minutes: 5
      seconds: 0
    id: Bewegungsmelder zurückgesetzt
condition: []
action:
  - if:
      - condition: trigger
        id:
          - Bewegung ausgelöst
    then:
      - service: light.turn_on
        target:
          entity_id: light.flur_eg_haustur_deckenlampe
        data: {}
  - if:
      - condition: trigger
        id:
          - Bewegungsmelder zurückgesetzt
    then:
      - service: light.turn_off
        target:
          entity_id: light.flur_eg_haustur_deckenlampe
        data: {}
mode: single

Automatisierung 2:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
alias: Automatisierung 2
description: Steckdose Zeitplan
trigger:
- platform: state
entity_id:
- schedule.steckdose_schalten
from: "off"
to: "on"
id: Zeitplan aktiv
- platform: state
entity_id:
- schedule.steckdose_schalten
from: "on"
to: "off"
id: Zeitplan inaktiv
condition: []
action:
- if:
- condition: trigger
id:
- Zeitplan aktiv
then:
- service: switch.turn_on
target:
entity_id: switch.smartplugstudio
data: {}
- if:
- condition: trigger
id:
- Zeitplan inaktiv
then:
- service: switch.turn_off
target:
entity_id: switch.smartplugstudio
data: {}
mode: single
alias: Automatisierung 2 description: Steckdose Zeitplan trigger: - platform: state entity_id: - schedule.steckdose_schalten from: "off" to: "on" id: Zeitplan aktiv - platform: state entity_id: - schedule.steckdose_schalten from: "on" to: "off" id: Zeitplan inaktiv condition: [] action: - if: - condition: trigger id: - Zeitplan aktiv then: - service: switch.turn_on target: entity_id: switch.smartplugstudio data: {} - if: - condition: trigger id: - Zeitplan inaktiv then: - service: switch.turn_off target: entity_id: switch.smartplugstudio data: {} mode: single
alias: Automatisierung 2
description: Steckdose Zeitplan
trigger:
  - platform: state
    entity_id:
      - schedule.steckdose_schalten
    from: "off"
    to: "on"
    id: Zeitplan aktiv
  - platform: state
    entity_id:
      - schedule.steckdose_schalten
    from: "on"
    to: "off"
    id: Zeitplan inaktiv
condition: []
action:
  - if:
      - condition: trigger
        id:
          - Zeitplan aktiv
    then:
      - service: switch.turn_on
        target:
          entity_id: switch.smartplugstudio
        data: {}
  - if:
      - condition: trigger
        id:
          - Zeitplan inaktiv
    then:
      - service: switch.turn_off
        target:
          entity_id: switch.smartplugstudio
        data: {}
mode: single

Automatisierung 3:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
alias: Automatisierung 3
description: Sonnenaufgang / Untergang
trigger:
- platform: sun
event: sunrise
offset: "-01:00:00"
id: Sonnenaufgang Beleuchtung aus
- platform: sun
event: sunset
offset: "01:00:00"
id: Sonnenuntergang Beleuchtung an
condition: []
action:
- if:
- condition: trigger
id:
- Sonnenaufgang Beleuchtung aus
then:
- service: light.turn_off
data: {}
target:
entity_id: light.carport_aussen_wandlampe
- if:
- condition: trigger
id:
- Sonnenuntergang Beleuchtung an
then:
- service: light.turn_on
data: {}
target:
entity_id: light.carport_aussen_wandlampe
mode: single
alias: Automatisierung 3 description: Sonnenaufgang / Untergang trigger: - platform: sun event: sunrise offset: "-01:00:00" id: Sonnenaufgang Beleuchtung aus - platform: sun event: sunset offset: "01:00:00" id: Sonnenuntergang Beleuchtung an condition: [] action: - if: - condition: trigger id: - Sonnenaufgang Beleuchtung aus then: - service: light.turn_off data: {} target: entity_id: light.carport_aussen_wandlampe - if: - condition: trigger id: - Sonnenuntergang Beleuchtung an then: - service: light.turn_on data: {} target: entity_id: light.carport_aussen_wandlampe mode: single
alias: Automatisierung 3
description: Sonnenaufgang / Untergang
trigger:
  - platform: sun
    event: sunrise
    offset: "-01:00:00"
    id: Sonnenaufgang Beleuchtung aus
  - platform: sun
    event: sunset
    offset: "01:00:00"
    id: Sonnenuntergang Beleuchtung an
condition: []
action:
  - if:
      - condition: trigger
        id:
          - Sonnenaufgang Beleuchtung aus
    then:
      - service: light.turn_off
        data: {}
        target:
          entity_id: light.carport_aussen_wandlampe
  - if:
      - condition: trigger
        id:
          - Sonnenuntergang Beleuchtung an
    then:
      - service: light.turn_on
        data: {}
        target:
          entity_id: light.carport_aussen_wandlampe
mode: single

Automatisierung 4:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
alias: Automatisierung 4
description: Temperatur Kühlschrank
trigger:
- platform: numeric_state
entity_id:
- sensor.temperatursensor_kuhlschrank_buro_temperature
for:
hours: 0
minutes: 1
seconds: 0
above: 15
condition: []
action:
- service: notify.notify
data:
message: Der Kühlschrank erreicht eine kritische Temperatur
title: Kühltemperatur Achtung !
mode: single
alias: Automatisierung 4 description: Temperatur Kühlschrank trigger: - platform: numeric_state entity_id: - sensor.temperatursensor_kuhlschrank_buro_temperature for: hours: 0 minutes: 1 seconds: 0 above: 15 condition: [] action: - service: notify.notify data: message: Der Kühlschrank erreicht eine kritische Temperatur title: Kühltemperatur Achtung ! mode: single
alias: Automatisierung 4
description: Temperatur Kühlschrank
trigger:
  - platform: numeric_state
    entity_id:
      - sensor.temperatursensor_kuhlschrank_buro_temperature
    for:
      hours: 0
      minutes: 1
      seconds: 0
    above: 15
condition: []
action:
  - service: notify.notify
    data:
      message: Der Kühlschrank erreicht eine kritische Temperatur
      title: Kühltemperatur Achtung !
mode: single

Automatisierung 5:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
alias: Automatisierung 5
description: ""
trigger:
- platform: state
entity_id:
- sensor.nachtmodus_action
from: null
condition: []
action:
- service: input_boolean.toggle
target:
entity_id: input_boolean.smarthome_nachtmodus
data: {}
- if:
- condition: state
entity_id: input_boolean.smarthome_nachtmodus
state: "on"
then:
- service: light.turn_off
data: {}
target:
entity_id:
- all
- if:
- condition: state
entity_id: input_boolean.smarthome_nachtmodus
state: "off"
then:
- service: light.turn_on
target:
entity_id:
- light.flur_og_treppe_deckenlampe
- light.flur_eg_treppe_deckenlampe
data: {}
mode: single
alias: Automatisierung 5 description: "" trigger: - platform: state entity_id: - sensor.nachtmodus_action from: null condition: [] action: - service: input_boolean.toggle target: entity_id: input_boolean.smarthome_nachtmodus data: {} - if: - condition: state entity_id: input_boolean.smarthome_nachtmodus state: "on" then: - service: light.turn_off data: {} target: entity_id: - all - if: - condition: state entity_id: input_boolean.smarthome_nachtmodus state: "off" then: - service: light.turn_on target: entity_id: - light.flur_og_treppe_deckenlampe - light.flur_eg_treppe_deckenlampe data: {} mode: single
alias: Automatisierung 5
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.nachtmodus_action
    from: null
condition: []
action:
  - service: input_boolean.toggle
    target:
      entity_id: input_boolean.smarthome_nachtmodus
    data: {}
  - if:
      - condition: state
        entity_id: input_boolean.smarthome_nachtmodus
        state: "on"
    then:
      - service: light.turn_off
        data: {}
        target:
          entity_id:
            - all
  - if:
      - condition: state
        entity_id: input_boolean.smarthome_nachtmodus
        state: "off"
    then:
      - service: light.turn_on
        target:
          entity_id:
            - light.flur_og_treppe_deckenlampe
            - light.flur_eg_treppe_deckenlampe
        data: {}
mode: single

Home Assistant Backup & Restore auf Synology NAS

YouTube player

Hier kannst du sehen, wie du automatisierte Backups mit den Mitteln von Home Assistant erstellst und diese auch wiederherstellen kannst. Was benötigst du dafür ? Eine Samba Freigabe, Synology NAS, oder anderes NAS und dein Home Assistant.

Hier findest du ein Synology NAS*:

Synology DiskStation DS723+ NAS/Storage Server Tower Ethernet LAN Black R1600 & Seagate IronWolf 4 TB interne Festplatte, NAS HDD, 3.5 Zoll, 5400 U/Min, CMR, 64 MB Cache, SATA 6 GB/s, Silber
  • Produkt 1: Synology DiskStation DS723+ NAS/storage server Tower Ethernet LAN Black R1600
  • Produkt 2: Robust. Bereit. Die für NAS mit AgileArray optimierten IronWolf-Festplatten der Enterprise-Klasse wurden speziell für den Dauerbetrieb in NAS-Systemen mit RAID und mit bis zu 8 Laufwerksschächten ausgelegt. Vom NAS-Anbieter genehmigt Durch führende NAS-Anbieter Kompatibilitätstests und -kontrollen unterzogen. Überwachung der Laufwerksintegrität Automatische Anzeige von Präventions-, Interventions- und Wiederherstellungsoptionen. Schnelleres Abrufen von Daten 5.900 U/min für Ausführungen mit geringerer Kapazität, 7.200 U/min für Ausführungen mit größerer Kapazität. Erstklassige Leistung AgileArray-Firmware bietet Vibrationstoleranz für NAS.
  • Produkt 2: Die internen IronWolf-Festplatten sind die ideale Lösung für anspruchsvolle NAS-Umgebungen mit bis zu 8 Laufwerksschächten und mehreren Benutzern
  • Produkt 2: Speichern Sie mehr und arbeiten Sie schneller mit einer für NAS optimierten Festplatte mit extrem hoher Kapazität von 16 TB und einem Cache von bis zu 256 MB
  • Produkt 2: Die IronWolf wurde speziell für NAS-Systeme ausgelegt und bietet weniger Verschleiß, wenig bis gar keine Geräusche und Vibrationen, keine Verzögerungen oder Ausfallzeiten, eine höhere Leistung bei der Dateiübertragung und vieles mehr

Automatisierung Home Assistant Backup daily ( aus dem Video):

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
alias: Home Assistant Backup daily
description: ""
trigger:
- platform: time
at: "23:00:00"
condition: []
action:
- service: hassio.backup_full
data:
compressed: true
mode: single
alias: Home Assistant Backup daily description: "" trigger: - platform: time at: "23:00:00" condition: [] action: - service: hassio.backup_full data: compressed: true mode: single
alias: Home Assistant Backup daily
description: ""
trigger:
  - platform: time
    at: "23:00:00"
condition: []
action:
  - service: hassio.backup_full
    data:
      compressed: true
mode: single