Skip to main content

configuration.yaml

In neueren Versionen von HomeAssistant wird sehr viel über die GUI konfiguriert und die YAML Konfiguration gerät in den Hintergrund. Das war auch mal anders :-)

Es gibt aber immer noch Notwendigkeiten für Konfiguration Dateien.

Am meisten für Template Sensoren, aber auch für spezielle Integrationen und anderes.

Split Configuration

https://www.home-assistant.io/docs/configuration/splitting_configuration/

Dabei wird die configuration.yaml ausgedünnt und die einzelnen "Module" in eigene Dateien ausgelagert.

Dies macht die Konfiguration deutlich übersichtlicher.

Das Besondere sind Packages. Während in den "normalen" includes immer nur ein Typ von Sensoren definiert werden kann, können in package Dateien alle Sensoren zu einem Thema kombiniert werden.

configuration.yaml

Das ist kein Beispiel wie es sein soll, sondern wie es sein kann. Es muss immer an die jeweiligen Gegebenheiten angepasst werden.

homeassistant:
  # Customization file - genau eine Datei
  customize: !include customize.yaml
  # Alle Datein im Verzeichnis "packages" werden geladen
  packages: !include_dir_named packages

  # Bestimmen, wie die Authentifizierung an HA erfolgt
  auth_providers:
    - type: homeassistant

# erlaubt das Erstellen eigener Python Scripts - weniger als appdaemon, mehr als Automationen
python_script:

#recorder:
#  db_url: mysql://homeassistant:n4gPY_wbqKACVjN3@192.168.178.7:3307/homeassistant?charset=utf8mb4

# zeigt die MAterial Icons in der Seitenleiste an
panel_iframe:
  iconindex:
    title: "More Icons"
    icon: "mdi:share"
    url: "https://mdi.bessarabov.com/"
  mdiindex:
    title: MDI Icon Index
    icon: mdi:vector-square
    url: https://cdn.materialdesignicons.com/3.2.89/

# Configure a default setup of Home Assistant (frontend, api, etc)
#
frontend:
  themes: !include_dir_merge_named themes

# übernimmt die meiste Konfiguration
default_config:

# Discover some devices automatically
discovery:

# für Kameras
stream:
  ll_hls: true
  part_duration: 0.75
  segment_duration: 6


config:

lovelace:

# wird auch für die Kameras benötigt
ffmpeg:
  ffmpeg_bin: /usr/bin/ffmpeg

# nicht mehr interressant
cloud: !include cloud.yaml

# influxdb konfig
influxdb:
  host: localhost
  port: 8086
  database: homeassistant
  username: !secret influxdb_user
  password: !secret influxdb_password
  max_retries: 3
  default_measurement: state
  ssl: false
  verify_ssl: false
  include:
    domains:
      - sensor
      - climate
      - light
      - binary_sensor
      - switch
      - device_tracker
      - camera

ios:

# das wäre die Anbindung der bosch connect fähigen geräte
#home_connect_alt:
#  client_id: !secret home_connect_client_id
#  client_secret: !secret home_connect_client_secret
#  name_template: $brand - $name
#  language: de
#  sensor_value_translation: server

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
http:
  ip_ban_enabled: False
  use_x_forwarded_for: true
  trusted_proxies:
    - 172.30.33.0/24

# Text to speech
tts:
  - platform: google_translate
    language: 'de'

# shell commands können in Automationen genutzt werden 
shell_command:
  #load_enpal: "curl http://192.168.178.56/CsTest?handler=StartTest"
  trv_set_ext_temp: "curl http://{{ trv_ip }}/ext_t?temp={{ ext_temp }}"

# single files needed for automations editor
automation: !include automations.yaml
scene: !include scenes.yaml
script: !include scripts.yaml

# includes by folders for manual editing
# yaml configuroerte automationen
automation old: !include_dir_merge_list include_automations/
# https://www.home-assistant.io/docs/configuration/splitting_configuration/
device_tracker: !include_dir_merge_list include_device_trackers/
group: !include_dir_merge_named include_groups/
input_boolean: !include_dir_merge_named include_input_booleans/
input_datetime: !include_dir_merge_named include_input_datetime/
input_number: !include_dir_merge_named include_input_numbers/
scene old: !include_dir_merge_list include_scenes/
sensor: !include_dir_merge_list include_sensors/
#shell_command: !include_dir_merge_named include_shell_commands/
#switch: !include_dir_merge_list include_switches/
camera: !include_dir_merge_list include_cameras/
#light groups: !include light_groups.yaml
#light switches: !include light_switches.yaml
var: !include_dir_merge_named include_vars/
#shelly: !include shelly.yaml
modbus: !include modbus.yaml

light:
  - platform: switch
    name: Gartensteckdose
    entity_id: switch.fritz_dect_200_5

  - platform: switch
    name: "Steckdose seitlich rechts"
    entity_id: switch.steckdose_aussen_seitlich_rechts_on_off
  
  
    
logger: !include logger.yaml

Dateisystem

Bildschirm­foto 2023-03-12 um 18.47.01.png