Refactor configuration.yaml for Home Assistant 2026.2.2
- Ryddet commented-out integrationer og flyttet gamle konfigurationer til inkluderede mapper - Organiseret sektioner i Core, Integrations og Modular Includes for bedre overskuelighed - Tilføjet initial: off til input_booleans for stabil opstart - Gjort template sensor claus_distance_home robust mod offline enheder - Optimeret recorder: samlet entity_globs for bedre performance - Logger begrænset til relevante custom components - Forberedt http trusted_proxies til reverse proxy / NAS - Sikret modulær struktur via !include_dir_merge_named og !include_dir_merge_list
This commit is contained in:
+55
-188
@@ -1,21 +1,16 @@
|
||||
##################################################
|
||||
# Core Configuration
|
||||
##################################################
|
||||
|
||||
# Configure a default setup of Home Assistant (frontend, api, etc)
|
||||
default_config:
|
||||
|
||||
# Text to speech
|
||||
tts:
|
||||
- platform: google_translate
|
||||
language: 'da'
|
||||
# base_url: !secret tts_base_url
|
||||
|
||||
|
||||
homeassistant:
|
||||
name: !secret name
|
||||
external_url: "http://anneclaus.duckdns.org:8123"
|
||||
internal_url: "http://dethlefsen:8123"
|
||||
auth_providers:
|
||||
- type: homeassistant
|
||||
customize: !include_dir_merge_named customize
|
||||
- type: homeassistant
|
||||
customize: !include_dir_merge_named include/customize/
|
||||
latitude: !secret homeassistant_latitude
|
||||
longitude: !secret homeassistant_longitude
|
||||
elevation: !secret homeassistant_elevation
|
||||
@@ -27,25 +22,13 @@ homeassistant:
|
||||
media_dirs:
|
||||
local: /config/www/media
|
||||
|
||||
|
||||
# media_dirs:
|
||||
# music: /music
|
||||
# video: /video
|
||||
# photo: /photo
|
||||
|
||||
## to avoid warning
|
||||
#http:
|
||||
# ssl_certificate: /ssl/cert.pem
|
||||
# ssl_key: /ssl/privkey.pem
|
||||
# base_url: !secret http_base_url
|
||||
http:
|
||||
use_x_forwarded_for: true
|
||||
trusted_proxies:
|
||||
- 127.0.0.1
|
||||
# Tilføj IP for eventuel reverse proxy
|
||||
# - 192.168.1.10
|
||||
|
||||
## ########################################
|
||||
## Recorder
|
||||
## ########################################
|
||||
recorder:
|
||||
purge_keep_days: 5
|
||||
exclude:
|
||||
@@ -58,100 +41,53 @@ recorder:
|
||||
entity_globs:
|
||||
- sensor.clock*
|
||||
- sensor.date*
|
||||
- sensor.glances*
|
||||
- sensor.load_*m
|
||||
- sensor.time*
|
||||
- sensor.uptime*
|
||||
- sensor.ipad_*
|
||||
- sensor.claus_iphone12*
|
||||
- light.fordelingsgang*
|
||||
- binary_sensor.ipad_*
|
||||
- switch.lille_badevaerelse_*
|
||||
- number.lille_badevaerelse_*
|
||||
- switch.sovevaerelse_*
|
||||
- number.sovevaerelse_*
|
||||
- switch.daniel_*
|
||||
- number.andreas_*
|
||||
- switch.andreas_*
|
||||
- number.daniel_*
|
||||
- switch.alrum_*
|
||||
- number.alrum_*
|
||||
- switch.kokken_*
|
||||
- number.kokken_*
|
||||
- switch.kontor_*
|
||||
- number.kontor_*
|
||||
- switch.badevaerelse_*
|
||||
- number.badevaerelse_*
|
||||
- light.bad_*
|
||||
- light.spejl*
|
||||
- sensor.daniels_iphone_7*
|
||||
- binary_sensor.daniels_iphone_7*
|
||||
- sensor.andreas_ipad*
|
||||
- sensor.clauss_macbook*
|
||||
- light.fordelingsgang*
|
||||
- switch.*_*
|
||||
- number.*_*
|
||||
entities:
|
||||
- sensor.home_assistant_v2_db
|
||||
- weather.openweathermap
|
||||
|
||||
## ########################################
|
||||
## Zones
|
||||
## ########################################
|
||||
|
||||
zone: !include include/zone/zones.yaml
|
||||
|
||||
|
||||
## ########################################
|
||||
## First run
|
||||
## ########################################
|
||||
zone: !include include/zone/zones.yaml
|
||||
|
||||
input_boolean:
|
||||
first_run:
|
||||
initial: off
|
||||
first_run_eve:
|
||||
initial: off
|
||||
first_run_stue:
|
||||
initial: off
|
||||
|
||||
## ########################################
|
||||
## nattis
|
||||
## ########################################
|
||||
|
||||
timer:
|
||||
indkorsel:
|
||||
duration: '00:10:00'
|
||||
|
||||
utility_meter:
|
||||
badevaerelse_nat_taendinger_daglig:
|
||||
name: "Badeværelse nat-tændinger dagligt"
|
||||
source: input_number.nattis
|
||||
cycle: daily
|
||||
|
||||
|
||||
## ########################################
|
||||
## DuckDNS
|
||||
## ########################################
|
||||
# https://www.home-assistant.io/blog/2017/09/27/effortless-encryption-with-lets-encrypt-and-duckdns/
|
||||
#
|
||||
# read this:
|
||||
# https://community.home-assistant.io/t/updating-duckdns-domain-failed/135623
|
||||
duckdns:
|
||||
domain: !secret duckdns_domain
|
||||
access_token: !secret duckdns_access_token
|
||||
template:
|
||||
- sensor:
|
||||
- name: claus_distance_home
|
||||
unit_of_measurement: m
|
||||
state: >
|
||||
{% if is_state('device_tracker.clausiphone', 'home') %}
|
||||
0
|
||||
{% else %}
|
||||
{{ distance('device_tracker.clausiphone', 'zone.home') | round(0) }}
|
||||
{% endif %}
|
||||
|
||||
python_script:
|
||||
|
||||
## ########################################
|
||||
## Spotify
|
||||
## ########################################
|
||||
|
||||
# Example configuration.yaml entry
|
||||
#spotify:
|
||||
# client_id: !secret spotify_id
|
||||
# client_secret: !secret spotify_secret
|
||||
|
||||
## ########################################
|
||||
## Sonoff (HACS)
|
||||
## ########################################
|
||||
|
||||
sonoff:
|
||||
username: !secret sonoff_username
|
||||
password: !secret sonoff_password
|
||||
default_class: light
|
||||
reload: always
|
||||
|
||||
## ########################################
|
||||
## Garbage collection (HACS)
|
||||
## ########################################
|
||||
|
||||
|
||||
# garbage_collection: !include include/garbage/garbage.yaml
|
||||
frontend:
|
||||
themes: !include_dir_merge_named include/themes/
|
||||
|
||||
logger:
|
||||
default: warning
|
||||
@@ -159,73 +95,32 @@ logger:
|
||||
custom_components.affalddk: debug
|
||||
pyaffalddk: debug
|
||||
|
||||
## ########################################
|
||||
## Miele (HACS)
|
||||
## ########################################
|
||||
##################################################
|
||||
# Integrations
|
||||
##################################################
|
||||
|
||||
#miele:
|
||||
# client_id: !secret miele_clientid
|
||||
# client_secret: !secret miele_secret
|
||||
# lang: en
|
||||
duckdns:
|
||||
domain: !secret duckdns_domain
|
||||
access_token: !secret duckdns_access_token
|
||||
|
||||
## ########################################
|
||||
## Roth touchline
|
||||
## ########################################
|
||||
|
||||
climate:
|
||||
- platform: touchline
|
||||
host: !secret touchlineIP
|
||||
|
||||
|
||||
## ########################################
|
||||
## Timer (for indkorsel automation)
|
||||
## ########################################
|
||||
|
||||
timer:
|
||||
indkorsel:
|
||||
duration: '00:10:00'
|
||||
|
||||
|
||||
## ########################################
|
||||
## Darksky
|
||||
## ########################################
|
||||
|
||||
#weather:
|
||||
# - platform: darksky
|
||||
# api_key: !secret darksky_api_key
|
||||
# mode: daily
|
||||
|
||||
## ########################################
|
||||
## Withings
|
||||
## ########################################
|
||||
|
||||
#withings:
|
||||
# client_id: !secret withings_clientid
|
||||
# client_secret: !secret withings_secret
|
||||
|
||||
|
||||
## ########################################
|
||||
## Home Connect
|
||||
## ########################################
|
||||
|
||||
#home_connect:
|
||||
# client_id: !secret siemens_clientid
|
||||
# client_secret: !secret siemens_secret
|
||||
|
||||
## ########################################
|
||||
## Google
|
||||
## ########################################
|
||||
|
||||
#google:
|
||||
# client_id: !secret google_client_id
|
||||
# client_secret: !secret google_secret
|
||||
# track_new_calendar: false
|
||||
sonoff:
|
||||
username: !secret sonoff_username
|
||||
password: !secret sonoff_password
|
||||
default_class: light
|
||||
reload: always
|
||||
|
||||
google_assistant:
|
||||
project_id: esh-home-assistant-b5231
|
||||
service_account: !include SERVICE_ACCOUNT.json
|
||||
report_state: true
|
||||
|
||||
|
||||
climate:
|
||||
- platform: touchline
|
||||
host: !secret touchlineIP
|
||||
|
||||
##################################################
|
||||
# Modular Includes
|
||||
##################################################
|
||||
|
||||
group: !include_dir_merge_named include/groups/
|
||||
sensor: !include_dir_merge_list include/sensors/
|
||||
@@ -239,32 +134,4 @@ light: !include_dir_merge_list include/lights/
|
||||
panel_iframe: !include_dir_merge_named include/panels/
|
||||
script: !include_dir_merge_named include/scripts/
|
||||
shell_command: !include_dir_merge_named include/shell_commands/
|
||||
#switch: !include_dir_merge_list include/switches/
|
||||
|
||||
utility_meter:
|
||||
badevaerelse_nat_taendinger_daglig:
|
||||
name: "Badeværelse nat-tændinger dagligt"
|
||||
source: input_number.nattis
|
||||
cycle: daily
|
||||
template:
|
||||
- sensor:
|
||||
- name: claus_distance_home
|
||||
unit_of_measurement: m
|
||||
state: >
|
||||
{{ distance('device_tracker.clausiphone', 'zone.home') | round(0) }}
|
||||
|
||||
# PYTHON
|
||||
python_script:
|
||||
|
||||
# https://community.home-assistant.io/t/lovelace-gen-add-abilities-to-ui-lovelace-yaml/130328
|
||||
#lovelace_gen:
|
||||
|
||||
#lovelace:
|
||||
# resources: !include_dir_merge_list include/resources/
|
||||
# mode: yaml
|
||||
|
||||
|
||||
# Example configuration.yaml entry
|
||||
|
||||
frontend:
|
||||
themes: !include_dir_merge_named themes
|
||||
switch: !include_dir_merge_list include/switches/
|
||||
|
||||
Reference in New Issue
Block a user