Files
homeassistant-prod/configuration.yaml
2025-12-16 18:42:25 +01:00

445 lines
12 KiB
YAML
Executable File

homeassistant:
# Location required to calculate the time the sun rises and sets.
# Coordinates are also used for location for weather related components.
# Google Maps can be used to determine more precise GPS coordinates.
latitude: !secret home_latitude
longitude: !secret home_longitude
country: DE
# Impacts weather/sunrise data
elevation: !secret home_elevation
# 'metric' for Metric System, 'imperial' for imperial system
unit_system: metric
# Pick yours from here:
# http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
time_zone: Europe/Berlin
# Name of the location where Home Assistant is running
name: Home
# Customization file
customize: !include customize.yaml
auth_providers:
# must be included for alexa/reverse proxy access
- type: homeassistant
- type: trusted_networks
trusted_networks:
- 192.168.178.0/24
- 192.168.144.0/24
- 172.0.0.0/8
- fd00::/8
mobile_app:
#discovery:
my:
schedule:
weekend_schedule:
name: "Wochenende"
saturday:
- from: "04:00:00"
to: "22:00:00"
sunday:
- from: "04:00:00"
to: "22:00:00"
system_health:
person:
# Enables the frontend
frontend:
#themes: !include themes.yaml
themes: !include_dir_merge_named themes
# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
http:
# ssl_certificate: ssl/fritz.box.crt
# ssl_key: ssl/fritz.box.key
use_x_forwarded_for: true
trusted_proxies:
- 192.168.178.0/24 # Add the IP address of the proxy server
- 192.168.144.2 # Add the IP address of the proxy server
- 172.24.0.0/16
# base_url: example.duckdns.org:8123
config:
# helper enablement
input_datetime:
input_text:
counter:
timer:
#default_config:
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
homematic:
local_port: 8060
interfaces:
wireless:
host: !secret ccu_host
username: !secret ccu_user
password: !secret ccu_password
callback_ip: !secret ccu_callback_ip
callback_port: 8060
ip:
host: !secret ccu_host
port: 2010
hosts:
ccu2:
host: !secret ccu_host
username: !secret ccu_user
password: !secret ccu_password
switch:
- platform: wake_on_lan
mac: !secret mac_vdr
host: !secret host_vdr
name: VDR
- platform: wake_on_lan
mac: !secret mac_ds
host: !secret host_ds
name: Diskstation
emulated_hue:
host_ip: !secret ip_ha_raspi
listen_port: 8300
expose_by_default: true
exposed_domains:
- light
- switch
logbook:
alexa:
smart_home:
locale: de-DE
filter:
include_entities:
- light.wzstehlampe
- light.kellerlampe
intent_script: !include alexa.yaml
#
zone:
name: Home
latitude: !secret home_latitude
longitude: !secret home_longitude
radius: 50
icon: mdi:account-multiple
zone 2:
name: !secret work_name
latitude: !secret work_lat
longitude: !secret work_long
radius: 300
icon: mdi:worker
sun:
influxdb:
host: !secret influx_host
username: !secret influx_user
password: !secret influx_pwd
max_retries: 3
database: "home_assistant"
tags:
instance: prod
source: hass
include:
domains:
- sensor
template:
- switch:
- turn_on:
- data:
entity_id: homematic.ccu2
name: ThunderstormMode
value: true
action: homematic.set_variable_value
- turn_off:
- data:
entity_id: homematic.ccu2
name: ThunderstormMode
value: false
action: homematic.set_variable_value
default_entity_id: switch.ccu_tsm
state: '{{ is_state("binary_sensor.ccu_thunderstorm_mode","on") }}'
name: ccu_tsm
- switch:
- turn_on:
- action: script.fernsehschauenstarten
- turn_off:
- action: script.noop
default_entity_id: switch.run_script_fernsehschauen
name: run_script_fernsehschauen
- switch:
- turn_on:
- action: script.streamingstarten
- turn_off:
- action: script.noop
default_entity_id: switch.run_script_streamingstarten
name: run_script_streamingstarten
- switch:
- turn_on:
- action: script.musikstreamingstarten
- turn_off:
- action: script.noop
default_entity_id: switch.run_script_musikstreamingstarten
name: run_script_musikstreamingstarten
- switch:
- turn_on:
- action: script.radiostarten
- turn_off:
- action: script.noop
default_entity_id: switch.run_script_radiostarten
name: run_script_radiostarten
- sensor:
- name: ventil_wohnzimmer
unit_of_measurement: '%'
default_entity_id: sensor.ventil_wohnzimmer
state: '{{states.climate.neq1493917.attributes.valve }}'
- sensor:
- name: ventil_kueche
unit_of_measurement: '%'
default_entity_id: sensor.ventil_kueche
state: '{{states.climate.neq0879536.attributes.valve }}'
- sensor:
- name: ventil_schlafzimmer
unit_of_measurement: '%'
default_entity_id: sensor.ventil_schlafzimmer
state: '{{states.climate.neq1412900.attributes.valve }}'
- sensor:
- name: ventil_bad
unit_of_measurement: '%'
default_entity_id: sensor.ventil_bad
state: '{{states.climate.keq1041886.attributes.valve }}'
- sensor:
- name: ventil_kinderzimmer
unit_of_measurement: '%'
default_entity_id: sensor.ventil_kinderzimmer
state: '{{states.climate.neq1411043.attributes.valve }}'
- sensor:
- name: ventil_studio
unit_of_measurement: '%'
default_entity_id: sensor.ventil_studio
state: '{{states.climate.qeq1461341.attributes.valve }}'
- sensor:
- name: ventil_gaestezimmer
unit_of_measurement: '%'
default_entity_id: sensor.ventil_gaestezimmer
state: '{{state_attr(''climate.000a18a99700a0'', ''valve'' )}}'
- sensor:
- default_entity_id: sensor.sun_elevation
state: '{{ states.sun.sun.attributes.elevation }}'
name: sun_elevation
- sensor:
- default_entity_id: sensor.ccu_service_meldungen
name: CCU Servicemeldungen
state: '{{ states.homematic.ccu2.state | int }}'
- sensor:
- name: Wohnzimmer Harmony
default_entity_id: sensor.remote_wohnzimmer_activity
state: '{{ states.remote.harmony_hub_wohnzimmer.attributes.current_activity }}'
- sensor:
- name: Schlafzimmer Harmony
default_entity_id: sensor.remote_schlafzimmer_activity
state: '{{ states.remote.harmony_hub_schlafzimmer.attributes.current_activity }}'
- sensor:
- default_entity_id: sensor.sunset_time
name: Sonnenuntergang
state: '{{ ((as_timestamp(states.sun.sun.attributes.next_setting)) | timestamp_local) [11:16] }}'
- sensor:
- default_entity_id: sensor.sunrise_time
name: Sonnenaufgang
state: '{{ ((as_timestamp(states.sun.sun.attributes.next_rising)) | timestamp_local) [11:16] }}'
- trigger:
- platform: state
entity_id: binary_sensor.motionwohnzimmer_occupancy
from: "off"
to: "on"
binary_sensor:
name: bewegung_wohnzimmer_occupancy_delayed
state: 'on'
auto_off: '01:30:00'
- trigger:
- platform: time_pattern
minutes: /2
- platform: homeassistant
event: start
action:
- service: weather.get_forecasts
data:
type: daily
target:
entity_id:
- weather.heidelberg
response_variable: daily
sensor:
- name: Daily Forecast
unique_id: weather_forecast_daily
state: "{{ daily['weather.heidelberg'].forecast[0].temperature }}"
attributes:
cloud_coverage: "{{ daily['weather.heidelberg'].forecast[0].cloud_coverage }}"
condition: "{{ daily['weather.heidelberg'].forecast[0].condition }}"
datetime: "{{ daily['weather.heidelberg'].forecast[0].datetime }}"
temperature: "{{ daily['weather.heidelberg'].forecast[0].temperature }}"
input_boolean:
vacation_mode:
name: Vacation
icon: mdi:beach
baby_bed:
name: Baby im Bett
icon: mdi:baby
input_number:
humidity_threshold:
name: Bad Luftfeuchte
initial: 68
min: 50
max: 80
step: 1
input_select:
living_room_tv:
name: Wohnzimmer TV
options:
- PowerOff
- Fernsehen
- Radio
- Musik Streaming
- Smart TV wiedergeben
initial: PowerOff
icon: mdi:monitor
bed_room_tv:
name: Schlafzimmer TV
options:
- PowerOff
- Fernsehen
- Fire TV sehen
initial: PowerOff
icon: mdi:monitor
input_button:
stream:
#camera:
# - platform: generic
# name: Babycam
# stream_source: http://babycam.fritz.box/min.php
# still_image_url: http://babycam.fritz.box/cam_pic.php
google_assistant:
project_id: homeassistantintegration-c23fa
#report_state: true
exposed_domains:
- switch
- light
- sensor
- climate
mqtt:
sensor:
- name: shelly_outsid__temp
state_topic: "shellies/shellyht-F939CE/sensor/temperature"
unit_of_measurement: "° C"
- name: shelly_outside_hum
state_topic: "shellies/shellyht-F939CE/sensor/humidity"
unit_of_measurement: "%"
- name: shelly_outside_bat
state_topic: "shellies/shellyht-F939CE/sensor/battery"
unit_of_measurement: "%"
cover:
- name: studio_shades
command_topic: "esp32/output"
payload_available: true
payload_open: "up"
payload_close: "down"
payload_stop: "stop"
- name: bedroom_cover_l
command_topic: "shellies/shellyswitch25-C4C361/roller/0/command"
position_topic: "shellies/shellyswitch25-C4C361/roller/0/pos"
set_position_topic: "shellies/shellyswitch25-C4C361/roller/0/command/pos"
payload_available: "true"
payload_not_available: "false"
qos: 1
retain: false
payload_open: "open"
payload_close: "close"
payload_stop: "stop"
position_open: 100
position_closed: 0
optimistic: false
history:
include:
domains:
- sensor
- switch
recorder:
db_url: !secret postgres_connection
purge_keep_days: 7
exclude:
domains:
- automation
- updater
- script
- scene
entities:
- sun.sun # Don't record sun data
- sensor.last_boot # Comes from 'systemmonitor' sensor platform
- sensor.date
- sensor.pihole_ads_blocked_today
- sensor.pihole_ads_percentage_blocked_today
- sensor.pihole_dns_queries_cached
- sensor.pihole_dns_queries_forwarded
- sensor.pihole_dns_queries_today
- sensor.pihole_dns_unique_clients
- sensor.pihole_dns_unique_domains
- sensor.pihole_domains_blocked
- media_player.fire_tv_schlafzimmer
- media_player.fire_tv_wohnzimmer
- sensor.aeon_labs_zw074_multisensor_gen5_burglar
- sensor.aeon_labs_zw074_multisensor_gen5_alarm_type
- group.tradfri
- sensor.dark_sky_icon
logger:
default: warning
logs:
homeassistant.components: warning
#homeassistant.components.automation: info
homeassistant.components.influxdb: warning
homeassistant.components.homematic: warning
homeassistant.components.http.ban: error
homeassistant.components.alexa: error
homeassistant.components.scripts: error
homeassistant.components.scenes: error
homeassistant.components.webhook: info
homeassistant.components.http: warning
pyhomematic: error
homeassistant.components.wake_on_lan: debug
homeassistant.components.harmony: error
homeassistant.components.device_tracker: error
custom_components.pyscript: info
fritzconnection: info