1
0
ansible-home-assistant/configuration/configuration.yaml

486 lines
12 KiB
YAML

# Configure a default setup of Home Assistant (frontend, api, etc)
automation: !include automations.yaml
#cloud:
config:
counter:
dhcp:
energy:
frontend:
history:
http:
use_x_forwarded_for: true
trusted_proxies:
- 192.168.50.100
- 192.168.50.101
- 192.168.50.102
- 192.168.50.103
- 192.168.50.104
ip_ban_enabled: false
login_attempts_threshold: 5
image:
input_boolean:
input_datetime:
input_number:
# Living Room
living_room_air_purifier_favorite_level:
name: "Favorite level"
initial: 0
min: 0
max: 14
step: 1
icon: "mdi:weather-windy"
# Bedroom
bedroom_air_purifier_favorite_level:
name: "Favorite level"
initial: 0
min: 0
max: 14
step: 1
icon: "mdi:weather-windy"
living_room_air_purifier_fan_level:
name: "Fan level"
initial: 1
min: 1
max: 3
step: 1
icon: "mdi:weather-windy"
input_select:
# Living Room
living_room_air_purifier_mode:
name: Mode
options:
- Auto
- Silent
- Favorite
- Fan
icon: "mdi:animation-outline"
# Bedroom
bedroom_air_purifier_mode:
name: Mode
options:
- Auto
- Silent
- Favorite
- Fan
icon: "mdi:animation-outline"
home_mode:
name: Home mode
options:
- Day
- Night
- Party
- Away
icon: "mdi:home"
input_text:
logbook:
network:
map:
media_source:
mobile_app:
my:
person:
python_script:
recorder:
db_url: !secret postgres_url
scene: !include scenes.yaml
script: !include scripts.yaml
ssdp:
stream:
sun:
system_health:
#tag:
timer:
updater:
webhook:
zeroconf:
zone:
# Text to speech
tts:
- platform: google_translate
cache: true
base_url: http://192.168.60.100:8123
group: !include groups.yaml
zha:
zigpy_config:
network:
channel: 15
ota:
ikea_provider: true
ledvance_provider: true
mqtt:
broker: 127.0.0.1
ios:
actions:
- name: door_lock
background_color: "#000000"
label:
text: "Door Lock"
color: "#000000"
icon:
icon: lock-open
color: "#ffffff"
zoneminder:
- host: zoneminder.grondek.pl
ssl: true
verify_ssl: true
path_zms: /zm/cgi-bin/nph-zms
path: /zm/
camera:
- platform: zoneminder
- platform: xiaomi_cloud_map_extractor
host: 192.168.60.7
token: !secret xiaomi_vacuum_token
username: xiaomi@nerull7.info
password: !secret xiaomi_cloud_password
draw: [ 'all' ]
attributes:
- calibration_points
- platform: generic
name: '3D Printer Camera'
still_image_url: https://192.168.110.11:8554/currentpic.cgi
stream_source: rtsp://192.168.110.11:8554/unicast
rtsp_transport: udp
verify_ssl: false
scan_interval: 5
- platform: generic
name: 'Kitchen Direct'
still_image_url: https://192.168.110.12:8554/currentpic.cgi
stream_source: rtsp://192.168.110.12:8554/unicast
rtsp_transport: udp
verify_ssl: false
scan_interval: 5
- platform: generic
name: 'Hallway Direct'
still_image_url: https://192.168.110.13:8554/currentpic.cgi
stream_source: rtsp://192.168.110.13:8554/unicast
rtsp_transport: udp
verify_ssl: false
scan_interval: 5
influxdb:
host: 192.168.50.100
port: 8086
database: home-assistant
username: home-assistant
password: !secret influxdb_password
alarm_control_panel:
- platform: manual
notify:
- platform: nfandroidtv
name: Shield
host: 192.168.60.18
color: black
- platform: sms
name: sms_notification
recipient: !secret phone_number
media_player:
- platform: androidtv
name: Bedroom ATV
device_class: androidtv
host: 192.168.60.17
adbkey: "/config/android/adbkey"
- platform: androidtv
name: nVidia Shield
device_class: androidtv
host: 192.168.60.18
adbkey: "/config/android/adbkey"
# exclude_unnamed_apps: true
apps:
com.google.android.leanbacklauncher: AndroidTV Launcher
com.netflix.ninja: Netflix
com.liskovsoft.smarttubetv.beta: SmartTube
tv.twitch.android.app: Twitch
org.mozilla.firefox: Firefox
com.tvp.vodtv.tv: TVP VOD
pl.redefine.ipla: IPLA
com.amazon.amazonvideo.livingroom: Prime Video
eu.hbogo.androidtv.production: HBO GO
state_detection_rules:
'com.netflix.ninja':
- 'media_session_state'
'com.amazon.amazonvideo.livingroom':
- 'media_session_state'
'eu.hbogo.androidtv.production':
- 'media_session_state'
spotify:
client_id: !secret spotify_client_id
client_secret: !secret spotify_client_secret
shell_command:
pc_poweroff: 'ssh -i /config/.ssh/id_rsa -o UserKnownHostsFile=/config/.ssh/known_hosts home-assistant@hulk.lan sudo /sbin/poweroff'
pc_suspend: 'ssh -i /config/.ssh/id_rsa -o UserKnownHostsFile=/config/.ssh/known_hosts home-assistant@hulk.lan sudo /usr/sbin/pm-suspend'
rest_command:
octoprint_connect:
url: 'http://192.168.50.6:5000/api/connection'
method: post
content_type: 'application/json'
headers:
X-Api-Key: !secret octoprint_api_key
payload: |
{
"command": "connect"
}
rest:
- scan_interval: 43200 # 12h
resource: 'https://warszawa19115.pl/harmonogramy-wywozu-odpadow?p_p_id=portalCKMjunkschedules_WAR_portalCKMjunkschedulesportlet_INSTANCE_o5AIb2mimbRJ&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_resource_id=ajaxResourceURL&p_p_cacheability=cacheLevelPage&p_p_col_id=column-1&p_p_col_count=1'
method: POST
payload: '_portalCKMjunkschedules_WAR_portalCKMjunkschedulesportlet_INSTANCE_o5AIb2mimbRJ_addressPointId=76748040'
headers:
Content-Type: 'application/x-www-form-urlencoded'
sensor:
- name: "Address"
value_template: "{{ value_json[0].adres }}"
- name: "Garbage Collection BIO"
device_class: 'timestamp'
value_template: "{{ value_json[0].harmonogramy[1].data }}"
json_attributes_path: "$.[0].harmonogramy.[1].frakcja"
json_attributes:
- id_frakcja
- kod
- nazwa
- opis
- name: "Garbage Collection Metal & Plastics"
device_class: 'timestamp'
value_template: "{{ value_json[0].harmonogramy[2].data }}"
json_attributes_path: "$.[0].harmonogramy.[2].frakcja"
json_attributes:
- id_frakcja
- kod
- nazwa
- opis
- name: "Garbage Collection Paper"
device_class: 'timestamp'
value_template: "{{ value_json[0].harmonogramy[3].data }}"
json_attributes_path: "$.[0].harmonogramy.[3].frakcja"
json_attributes:
- id_frakcja
- kod
- nazwa
- opis
- name: "Garbage Collection Glass"
device_class: 'timestamp'
value_template: "{{ value_json[0].harmonogramy[4].data }}"
json_attributes_path: "$.[0].harmonogramy.[4].frakcja"
json_attributes:
- id_frakcja
- kod
- nazwa
- opis
- name: "Garbage Collection Furniture"
device_class: 'timestamp'
value_template: "{{ value_json[0].harmonogramy[6].data }}"
json_attributes_path: "$.[0].harmonogramy.[6].frakcja"
json_attributes:
- id_frakcja
- kod
- nazwa
- opis
- name: "Garbage Collection Mixed"
device_class: 'timestamp'
value_template: "{{ value_json[0].harmonogramy[7].data }}"
json_attributes_path: "$.[0].harmonogramy.[7].frakcja"
json_attributes:
- id_frakcja
- kod
- nazwa
- opis
calendar:
- platform: caldav
url: https://cloud.grondek.pl/remote.php/dav
username: pgrondek
password: !secret nextcloud_token
custom_calendars:
- name: "Sleep"
calendar: "Automations"
search: "Sleep"
- name: "Wakeup"
calendar: "Automations"
search: "Wakeup"
- name: "Caffeine free time"
calendar: "Automations"
search: "Caffeine free"
- platform: caldav
url: https://cloud.grondek.pl/remote.php/dav
username: pgrondek
password: !secret nextcloud_token
calendars:
- "2021 FIA Formula One World Championship Race Calendar"
ble_monitor:
# Xiaomi BT Sensors
decimals: 1
period: 60
log_spikes: False
use_median: False
active_scan: False
# hci_interface: 0
bt_interface: 'DC:A6:32:8B:7B:AD'
report_unknown: False
discovery: True
devices:
- name: 'Bedroom sensor [BLE]'
mac: '58:2D:34:3B:67:B0'
- name: 'Filament Sensor'
mac: 'A4:C1:38:EC:AE:6B'
- name: 'Computer Cave sensor'
mac: 'A4:C1:38:05:3D:AF'
- name: 'Bathroom sensor [BLE]'
mac: 'A4:C1:38:49:30:DF'
- name: 'Rack sensor'
mac: 'A4:C1:38:5E:F8:84'
- name: 'Kettle'
mac: '7C:49:EB:30:61:CE'
- name: 'Thuja Plant'
mac: 'C4:7C:8D:6C:5B:25'
- name: 'Thuja Plant 2'
mac: 'C4:7C:8D:6C:9F:C6'
- name: 'Thuja Plant 3'
mac: 'C4:7C:8D:6C:9F:9B'
- name: 'Living Room Plant'
mac: 'C4:7C:8D:6C:59:D0'
- name: 'Living Room Plant 2'
mac: 'C4:7C:8D:6C:59:D5'
- name: 'Weight Scale'
mac: 'C8:47:8C:D9:6F:96'
sensor:
- platform: systemmonitor
resources:
- type: memory_use
- type: memory_free
- type: swap_use
- type: swap_free
- type: load_1m
- type: load_5m
- type: load_15m
- type: processor_use
- type: processor_temperature
- type: ipv4_address
arg: "eth0"
- type: ipv6_address
arg: "eth0"
- type: network_in
arg: "eth0"
- type: network_out
arg: "eth0"
- type: throughput_network_in
arg: "eth0"
- type: throughput_network_out
arg: "eth0"
- type: packets_in
arg: "eth0"
- type: packets_out
arg: "eth0"
# IMAP
- name: imap-notifications
platform: imap
server: imap.gmail.com
port: 993
username: 'home-assistant@nerull7.info'
password: !secret imap_password
# Power
- platform: integration
name: "3D printer energy Total"
unit_prefix: k
unit_time: h
source: sensor.3d_printer_power
- platform: integration
name: "Printer energy Total"
unit_prefix: k
unit_time: h
source: sensor.printer_power
- platform: integration
name: "Washing machine energy Total"
unit_prefix: k
unit_time: h
source: sensor.washing_machine_electrical_measurement
- platform: integration
name: "Computer energy Total"
unit_prefix: k
unit_time: h
source: sensor.computer_outlet_electrical_measurement
binary_sensor:
- name: Desktop
platform: ping
host: 192.168.50.21
- name: Bender
platform: ping
host: 192.168.50.3
- name: prusa
platform: ping
host: 192.168.50.8
- name: node-master
platform: ping
host: 192.168.50.100
- name: node-01
platform: ping
host: 192.168.50.101
- name: node-02
platform: ping
host: 192.168.50.102
- name: node-03
platform: ping
host: 192.168.50.103
- name: luxoft
platform: ping
host: 192.168.50.207
- name: smartthings
platform: ping
host: 192.168.60.2
- name: hue-lights
platform: ping
host: 192.168.60.3
- name: airpurifier-bedroom
platform: ping
host: 192.168.60.5
- name: airpurifier-livingroom
platform: ping
host: 192.168.60.6
- name: vacuum
platform: ping
host: 192.168.60.7
- name: soundbar
platform: ping
host: 192.168.60.8
- name: gree-ac
platform: ping
host: 192.168.60.13
- name: tv
platform: ping
host: 192.168.60.14
switch:
- platform: zoneminder
command_on: Modect
command_off: Monitor
# Wake On LAN
- platform: wake_on_lan
name: hulk
mac: '24:4b:fe:05:e2:8b'
cover:
- platform: group
name: Bedroom Blinds
entities:
- cover.bedroom_blind_left
- cover.bedroom_blind_right
- platform: group
name: Dining Blinds
entities:
- cover.dining_blind_left
- cover.dining_blind_right