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!

Link zur Dokumentation der Packages Integration:

Packages – Home Assistant (home-assistant.io)

Beispielautomatisierung Info Datenbankspeichergröße

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)

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

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

YouTube player

YAML Code:

Farbe Namen:

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:

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:

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:

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:

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 💙

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.

Beispielautomatisierung aus Video:

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):

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):

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 %}

Home Assistant: Schritt für Schritt – MQTT-Sensor mit Hilfe des MQTT-Explorer einrichten.

Entdecken Sie, wie Sie mithilfe des MQTT-Explorers einen MQTT-Sensor einrichten können. Erfahren Sie, wie Sie MQTT-Werte von EVCC (Electric Vehicle Charge Controller) als Beispiel integrieren, überwachen und steuern können. Tauchen Sie ein in die Welt des MQTT und bringen Sie Ihr Projekt auf das nächste Level!

Links aus dem Video:

MQTT Explorer Add-On: https://github.com/GollumDom/addon-repository

MQTT Sensor Integration: https://www.home-assistant.io/integrations/sensor.mqtt/

MQTT Select Platform: https://www.home-assistant.io/integrations/select.mqtt/

Die Basisinstallation von evcc erkläre ich in diesem Video:

Hinweis ! Damit evcc die Daten über MQTT exportiert müsst ihr euren Broker in der evcc.yaml eintragen.

# mqtt message broker
mqtt:
   broker: 192.168.101.79:1883 # euer MQTT-Broker mit Port
   topic: evcc # das Topic lasst ihr so stehen, dann findet ihr im MQTT-Explorer alles unter evcc
  # user: euer_user
  # password: euer_kennwort

Code aus der Configuration.yaml:

mqtt:
  sensor:
    - name: "PV Leistung"
      unique_id: evcc_pv_leistung_w
      state_topic: "evcc/site/pvPower"
      value_template: "{{value | round(1) }}"
      unit_of_measurement: "W"
      availability_topic: "evcc/status"
  select:
      state_topic: "evcc/loadpoints/1/mode"
      command_topic: "evcc/loadpoints/1/mode/set"
      name: "Charge Mode"
      unique_id: evcc_charge_mode_select
      options:
        - "off"
        - "now"
        - "minpv"
        - "pv"

Hinweis von @richyholzy4120 : Wenn man mehrere Ladestationen hat , dann sollte vor dem state_topic ein – gesetzt werden.

Hinweis von meiner Seite, das kann auch schon bei einer Ladestation so gemacht werden. Durch das “-” vor dem state_topic lassen sich mehrere select Sensoren anlegen. Die Variante von @richyholzy4120 ist somit durchgängiger !

mqtt:
  select:
    - state_topic: "evcc/loadpoints/1/mode"
      command_topic: "evcc/loadpoints/1/mode/set"
      name: "Charge Mode"
      unique_id: evcc_charge_mode_select
      options:
        - "off"
        - "now"
        - "minpv"
        - "pv"

Home Assistant: evcc Basisinstallation und Konfiguration

Willkommen zur Installation des Home Assistant EVCC Add-Ons – Ihrer Tür zu einem nahtlosen und intelligenten Energiemanagement für Ihr Zuhause! Mit EVCC integrieren Sie Ihre Ladestation spielend leicht in Ihr Smart Home, steuern Ladevorgänge optimal und senken Ihre Energiekosten. Folgen Sie einfach den Schritten in der Videopräsentation, passen Sie die Konfiguration an Ihre Bedürfnisse an und genießen Sie die Vorteile eines intelligenten Energiemanagements. Machen Sie sich bereit, Ihr Zuhause smarter und grüner zu gestalten – mit EVCC und Home Assistant an Ihrer Seite.

Links aus dem Video:

EVCC Home Assistant Add-On: https://github.com/evcc-io/hassio-addon

Modbusproxy Home Assistant Add-On: https://github.com/Akulatraxas/ha-modbusproxy

Hinweis von @kmreuther: Im Netzwerkproxy muss der Listenport und der Netzwerkport immer auf 502 bleiben. Ansonsten gibt es eine Fehlermeldung (failed to connect) .

evcc.yaml Beispielkonfiguration:

network:
  # schema is the HTTP schema
  # setting to `https` does not enable https, it only changes the way URLs are generated
  schema: http
  # host is the hostname or IP address
  # if the host name contains a `.local` suffix, the name will be announced on MDNS
  # docker: MDNS announcements don't work. host must be set to the docker host's name.
  host: 192.168.101.3 # Home Assistant IP-Adresse
  # port is the listening port for UI and api
  # evcc will listen on all available interfaces
  port: 7070

interval: 30s # control cycle interval. Interval <30s can lead to unexpected behavior, see https://docs.evcc.io/docs/reference/configuration/interval

# database configuration for persisting charge sessions and settings
# database:
#   type: sqlite
#   dsn: <path-to-db-file>

# sponsor token enables optional features (request at https://sponsor.evcc.io)
# sponsortoken:

# telemetry enables aggregated statistics
#
# Telemetry allows collecting usage data (grid and green energy, charge power).
# Data is aggregated, no individual charging sessions are tracked. The collected,
# anonymous data can be retrieved using https://api.evcc.io.
#
# See https://github.com/evcc-io/evcc/pull/4343 or details.
#
# For time being, this is only available to sponsors, hence data is associated with
# the sponsor token's identity.
#
# telemetry: true

# log settings
log: info
levels:
  site: debug
  lp-1: debug
  lp-2: debug
  cache: error
  db: error

# modbus proxy for allowing external programs to reuse the evcc modbus connection
# each entry will start a proxy instance at the given port speaking Modbus TCP and
# relaying to the given modbus downstream device (either TCP or RTU, RS485 or TCP)
modbusproxy:
  #  - port: 5200
  #    uri: solar-edge:502
  #    # rtu: true
  #    # readonly: true # use `deny` to raise modbus errors

# meter definitions
# name can be freely chosen and is used as reference when assigning meters to site and loadpoints
# for documentation see https://docs.evcc.io/docs/devices/meters
meters:
  - name: my_grid
    type: template
    template: solaredge-hybrid
    usage: grid
    
    # Modbus TCP
    modbus: tcpip
    id: 1
    host: 192.168.101.3 # Hostname
    port: 502 # Port
    timeout: 10s # optional 
    
  - name: my_pv
    type: template
    template: solaredge-hybrid
    usage: pv
    
    # Modbus TCP
    modbus: tcpip
    id: 1
    host: 192.168.101.3 # Hostname
    port: 502 # Port
    timeout: 10s # optional   
    
  - name: my_battery
    type: template
    template: solaredge-hybrid
    usage: battery

    # Modbus TCP
    modbus: tcpip
    id: 1
    host: 192.168.101.3 # Hostname
    port: 502 # Port
    timeout: 10s # optional     

# charger definitions
# name can be freely chosen and is used as reference when assigning charger to vehicle
# for documentation see https://docs.evcc.io/docs/devices/chargers
chargers:
  - name: my_charger
    type: template
    template: openwb-pro
    host: 192.168.101.82 # IP-Adresse oder Hostname 

# vehicle definitions
# name can be freely chosen and is used as reference when assigning vehicle to loadpoint
# for documentation see https://docs.evcc.io/docs/devices/vehicles
vehicles:
  - name: my_car
    type: template
    template: tesla
    title: # Wird in der Benutzeroberfläche angezeigt (optional)
    accessToken: [ dein Access Token ] # Tesla Access Token
    refreshToken: [ dein Refresh Token] # Tesla Refresh Token
    capacity: 60 # Akkukapazität in kWh (optional) 

# site describes the EVU connection, PV and home battery
site:
  title: Home # display name for UI
  meters:
    grid: my_grid # grid meter
    pv:
      - my_pv # list of pv inverters/ meters
    battery:
      - my_battery # list of battery meters

  residualPower: 100 # additional household usage margin
  maxGridSupplyWhileBatteryCharging: 0 # ignore battery charging if AC consumption is above this value

# loadpoint describes the charger, charge meter and connected vehicle
loadpoints:
  - title: Carport # display name for UI
    charger: my_charger # charger
    #meter: charge # charge meter
    mode: "off" # default charge mode to apply when vehicle is disconnected; use "off" to disable by default if charger is publicly available

    # remaining settings are experts-only and best left at default values
    priority: 0 # relative priority for concurrent charging in PV mode with multiple loadpoints (higher values have higher priority)
    soc:
      # polling defines usage of the vehicle APIs
      # Modifying the default settings it NOT recommended. It MAY deplete your vehicle's battery
      # or lead to vehicle manufacturer banning you from API use. USE AT YOUR OWN RISK.
      poll:
        # poll mode defines under which condition the vehicle API is called:
        #   charging: update vehicle ONLY when charging (this is the recommended default)
        #   connected: update vehicle when connected (not only charging), interval defines how often
        #   always: always update vehicle regardless of connection state, interval defines how often (only supported for single vehicle)
        mode: charging
        # poll interval defines how often the vehicle API may be polled if NOT charging
        interval: 60m
      estimate: true # set false to disable interpolating between api updates (not recommended)
    enable: # pv mode enable behavior
      delay: 1m # threshold must be exceeded for this long
      threshold: 0 # grid power threshold (in Watts, negative=export). If zero, export must exceed minimum charge power to enable
    disable: # pv mode disable behavior
      delay: 3m # threshold must be exceeded for this long
      threshold: 0 # maximum import power (W)

# tariffs are the fixed or variable tariffs
tariffs:
  currency: EUR # three letter ISO-4217 currency code (default EUR)
  grid:
    # either static grid price (or price zones)
    type: fixed
    price: 0.35 # EUR/kWh


    # or variable tariffs
    # type: tibber
    # token: "476c477d8a039529478ebd690d35ddd80e3308ffc49b59c65b142321aee963a4" # access token
    # homeid: "cc83e83e-8cbf-4595-9bf7-c3cf192f7d9c" # optional if multiple homes associated to account

    # type: awattar
    # region: de # optional, choose at for Austria
    # charges: # optional, additional charges per kWh
    # tax: # optional, additional tax (0.1 for 10%)

    # type: octopusenergy
    # tariff: AGILE-FLEX-22-11-25 # Tariff code
    # region: A # optional

    # type: elering # Nordpool
    # region: ee # or lt, lv, fi
    # charges: # optional, additional charges per kWh
    # tax: # optional, additional tax (0.1 for 10%)

    # type: energinet # Energinet using the price in DKK
    # region: dk1 # or dk2
    # charges: # optional, additional charges per kWh
    # tax: # optional, additional tax (0.1 for 10%)

    # type: entsoe # Entso-E european market data
    # domain: BZN|DE-LU # https://transparency.entsoe.eu/content/static_content/Static%20content/web%20api/Guide.html#_areas
    # securitytoken: # api token
    # charges: # optional, additional charges per kWh
    # tax: # optional, additional tax (0.1 for 10%)

    # type: pun # PUN - Prezzo unico nazionale - Hourly Italian wholesale prices
    # charges: 0 # optional, additional charges per kWh
    # tax: 0 # optional, additional tax (0.1 for 10%)

    # type: amber
    # token: # api token from https://app.amber.com.au/developers/
    # siteid: # site ID returned by the API
    # channel: general

    # type: custom # price from a plugin source; see https://docs.evcc.io/docs/reference/plugins
    # price:
    #   source: http
    #   uri: https://example.org/price.json
    #   jq: .price.current

  feedin:
    # rate for feeding excess (pv) energy to the grid
    type: fixed
    price: 0.08 # EUR/kWh

    # type: octopusenergy
    # tariff: AGILE-FLEX-22-11-25 # Tariff code
    # region: A # optional

    # type: amber
    # token: # api token from https://app.amber.com.au/developers/
    # siteid: # site ID returned by the API
    # channel: feedIn
  co2:
    # co2 tariff provides co2 intensity forecast and is for co2-optimized target charging if no variable grid tariff is specified
    # type: grünstromindex # GrünStromIndex (Germany only)
    # zip: <zip>

    # type: electricitymaps # https://app.electricitymaps.com/map
    # uri: <uri>
    # token: <token> # needs to be a token with forecast (not in the free tier)
    # zone: DE

    # type: ngeso # National Grid Electricity System Operator data (United Kingdom only) https://carbonintensity.org.uk/
    # provides national data if both region and postcode are omitted - do not supply both at the same time!
    # region: 1 # optional, coarser than using a postcode - see https://api.carbonintensity.org.uk/ for full list
    # postcode: SW1A1AA # optional

# mqtt message broker
mqtt:
  # broker: localhost:1883
  # topic: evcc # root topic for publishing, set empty to disable
  # user:
  # password:

# influx database
influx:
  # url: http://localhost:8086
  # database: evcc
  # user:
  # password:

# eebus credentials
eebus:
  # uri: # :4712
  # interfaces: # limit eebus to specific network interfaces
  # - en0
  # certificate: # local signed certificate, required, can be generated via `evcc eebus-cert`
  #   public: # public key
  #   private: # private key

# push messages
messaging:
  events:
    start: # charge start event
      title: Charge started
      msg: Started charging in "${mode}" mode
    stop: # charge stop event
      title: Charge finished
      msg: Finished charging ${chargedEnergy:%.1fk}kWh in ${chargeDuration}.
    connect: # vehicle connect event
      title: Car connected
      msg: "Car connected at ${pvPower:%.1fk}kW PV"
    disconnect: # vehicle connected event
      title: Car disconnected
      msg: Car disconnected after ${connectedDuration}
    soc: # vehicle soc update event
      title: Soc updated
      msg: Battery charged to ${vehicleSoc:%.0f}%
    guest: # vehicle could not be identified
      title: Unknown vehicle
      msg: Unknown vehicle, guest connected?
  services:
  # - type: pushover
  #   app: # app id
  #   recipients:
  #   - # list of recipient ids
  # - type: telegram
  #   token: # bot id
  #   chats:
  #   - # list of chat ids
  # - type: email
  #   uri: smtp://<user>:<password>@<host>:<port>/?fromAddress=<from>&toAddresses=<to>
  # - type: ntfy
  #   uri: https://<host>/<topics>
  #   priority: <priority>
  #   tags: <tags>

Home Assistant: Deine Fragen, Deine Lösungen, Teil 2

Willkommen zu meinem neuen Format, in dem wir uns mit Deinen Automatisierungsfragen auseinandersetzen und Lösungen präsentieren. Im heutigen Beispiel geht es um die Umrechnung von Temperatur und eine automatische Sommerzeit Umschaltung. Vielen Dank für Eure Fragen.

Umrechnung Fahrenheit in °C

{{ ((float(states.sensor.temperatursensor_buro_temperature.state) -32.0 ) * 5/9) | round(2)}}

History Stat Sensor für die Sommerzeiterfassung:

sensor:
  - platform: history_stats
    name: Sommerzeit Timer
    entity_id: input_boolean.helfer_sommerzeit_schalter
    unique_id: 'sommerzeit_timer'
    state: "on"
    type: time
    start:  >
            {% set status= states('input_button.helfer_sommerzeit_taster') %}
            {% if status in ['unknown', 'unavailable'] %}
            {{ now() }}
            {% else %}
            {{ status | as_datetime }}
            {% endif %}
    end: "{{ now() }}"

Automatisierung Sommerzeit Maikel:

alias: SomerZeit_Maikel
description: ""
trigger:
  - platform: numeric_state
    entity_id:
      - sensor.temperatursensor_buro_temperature
    above: 15
  - platform: numeric_state
    entity_id:
      - sensor.temperatursensor_buro_temperature
    below: 15
  - platform: time_pattern
    hours: /1
  - platform: numeric_state
    entity_id:
      - sensor.sommerzeit_timer
    above: 168
condition: []
action:
  - choose:
      - conditions:
          - condition: and
            conditions:
              - condition: numeric_state
                entity_id: sensor.temperatursensor_buro_temperature
                above: 15
              - condition: state
                entity_id: input_boolean.helfer_sommerzeit_schalter
                state: "off"
        sequence:
          - service: input_boolean.turn_on
            metadata: {}
            data: {}
            target:
              entity_id: input_boolean.helfer_sommerzeit_schalter
          - service: input_button.press
            metadata: {}
            data: {}
            target:
              entity_id: input_button.helfer_sommerzeit_taster
      - conditions:
          - condition: numeric_state
            entity_id: sensor.temperatursensor_buro_temperature
            below: 15
        sequence:
          - service: input_boolean.turn_off
            metadata: {}
            data: {}
            target:
              entity_id: input_boolean.helfer_sommerzeit_schalter
      - conditions:
          - condition: numeric_state
            entity_id: sensor.sommerzeit_timer
            above: 167.9
        sequence:
          - service: notify.notify
            metadata: {}
            data:
              message: "Es ist Sommerzeit :-) "
mode: single

Home Assistant: Smarte Nähe, Anleitung für eine Automatisierung zum Upgrade deines smarten Heims

Entdecke die Magie der Nähe! In dieser einfachen Anleitung erfährst du, wie du mit Home Assistant automatische Aktionen basierend auf deiner Umgebung auslösen kannst. Erlebe eine neue Dimension der Bequemlichkeit und Effizienz in deinem Zuhause!

Links aus dem Video:

DrawIO : draw.io (drawio.com)

Proximity Integration: Proximity – Home Assistant (home-assistant.io)

Nabu Casa: Nabu Casa

Flussdiagramm “ich entferne mich vom Haus”

Flussdiagramm “ich nähere mich meinem Haus”

Beispielautomatisierung YAML Code:

alias: Proximity_Automatisierung
description: ""
trigger:
  - platform: numeric_state
    entity_id:
      - sensor.eichgarten_14_2_nachste_entfernung
    above: 1000
    id: Entfernung > 1000 m
  - platform: numeric_state
    entity_id:
      - sensor.eichgarten_14_2_nachste_entfernung
    id: Entfernung < 1000 m
    below: 1000
condition: []
action:
  - choose:
      - conditions:
          - condition: and
            conditions:
              - condition: numeric_state
                entity_id: sensor.eichgarten_14_2_nachste_entfernung
                above: 1000
              - condition: state
                entity_id: sensor.eichgarten_14_2_nachste_fahrtrichtung
                state: away_from
              - condition: state
                entity_id: binary_sensor.proximity_helfer_gruppe_bewegungsmelder
                state: "off"
              - condition: trigger
                id:
                  - Entfernung > 1000 m
        sequence:
          - service: climate.set_temperature
            metadata: {}
            data:
              temperature: 16
            target:
              entity_id: climate.eichgarten_bad_unten
          - service: light.turn_off
            metadata: {}
            data: {}
            target:
              entity_id: light.proximity_helfer_gruppe_lichter
        alias: Wenn Personen sich vom Haus entfernen
      - conditions:
          - condition: and
            conditions:
              - condition: trigger
                id:
                  - Entfernung < 1000 m
              - condition: or
                conditions:
                  - condition: state
                    entity_id: sensor.eichgarten_14_2_nachste_fahrtrichtung
                    state: arrived
                  - condition: state
                    entity_id: sensor.eichgarten_14_2_nachste_fahrtrichtung
                    state: towards
              - condition: state
                entity_id: binary_sensor.proximity_helfer_gruppe_bewegungsmelder
                state: "off"
        sequence:
          - service: climate.set_temperature
            metadata: {}
            data:
              temperature: 21
            target:
              entity_id: climate.eichgarten_bad_unten
          - if:
              - condition: sun
                before: sunrise
                after: sunset
            then:
              - service: light.turn_on
                metadata: {}
                data: {}
                target:
                  entity_id: light.proximity_helfer_gruppe_lichter
mode: single

Home Assistant und Alexa Media Player, so gelingt die Installation 2024

Erlebe die Synergie zwischen Home Assistant und dem Alexa Media Player für eine nahtlose Integration in Deinem Smart Home. Entdecke, wie Du mithilfe dieser Technologien Deine Heimautomatisierung optimieren und Informationen mit Leichtigkeit wiedergeben lassen kannst.

Hier findest du noch weitere Informationen zur Integration:

Configuration · alandtse/alexa_media_player Wiki · GitHub

Beispiel Template für die Ausgabe eines Temperatursensors. Hier kann natürlich jeder Status eines Sensors ausgegeben werden, wenn man die Entität austauscht.

Die Temperatur im Studio ist {{ states.sensor.temperatursensor_buro_temperature.state }} Grad