-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathconfiguration.yaml
More file actions
142 lines (131 loc) · 4.54 KB
/
configuration.yaml
File metadata and controls
142 lines (131 loc) · 4.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
###################################################
# Home Assistant Main Configuration File #
###################################################
homeassistant:
customize: !include customize.yaml
# https://home-assistant.io/docs/configuration/packages/
packages: !include_dir_named packages
# Allow access to config dir, in order to have a sensor to monitor DB size.
allowlist_external_dirs:
- !secret allow_dir
# Include Files
automation: !include automations.yaml
group: !include groups.yaml
input_boolean: !include input_booleans.yaml
input_select: !include input_selects.yaml
light: !include lights.yaml
scene: !include scenes.yaml
script: !include scripts.yaml
sensor: !include sensors.yaml
####################################################
# Home Assistant Components #
####################################################
# https://www.home-assistant.io/integrations/api/
api:
# https://www.home-assistant.io/integrations/default_config/
default_config:
# https://www.home-assistant.io/integrations/history
history:
# https://home-assistant.io/components/http/
http:
login_attempts_threshold: 100
use_x_forwarded_for: true
trusted_proxies:
- 192.168.200.1 # Add HA Proxy
# https://www.home-assistant.io/components/logbook/
logbook:
include:
domains:
- automation
- script
entities:
- binary_sensor.northway_away
# https://www.home-assistant.io/components/logger/
logger:
default: error
# logs:
# homeassistant.core: debug
# homeassistant.components.recorder.core: debug
# RFXtrx: debug
# https://www.home-assistant.io/docs/ecosystem/ios/
ios:
# https://www.home-assistant.io/components/notify/
# and
# https://www.home-assistant.io/components/notify.group/
notify:
- name: adults
platform: group
services:
- service: mobile_app_martin_iphone12
- service: mobile_app_michelle_iphone_se
- name: martin
platform: group
services:
- service: mobile_app_martin_iphone12
- name: michelle
platform: group
services:
- service: mobile_app_michelle_iphone_se
- name: morgan
platform: group
services:
- service: mobile_app_morgans_iphone_15_pro
# https://www.home-assistant.io/components/recorder/
recorder:
# https://www.home-assistant.io/components/sun/
sun:
# https://www.home-assistant.io/components/tts/
tts:
- platform: google_translate
cache: true
cache_dir: /tmp/tts
time_memory: 300
- platform: voicerss
api_key: !secret voicerss_api_key
language: "en-gb"
format: "44khz_16bit_stereo"
####################################################
# Command Line #
####################################################
# Pi Temperature and Fan speed
command_line:
- sensor:
command: "cat /sys/class/thermal/thermal_zone0/temp"
name: HA CPU Temperature
unit_of_measurement: "°C"
value_template: '{{ value | multiply(0.001) | round(1) }}'
- sensor:
command: "cat /sys/devices/platform/cooling_fan/hwmon/hwmon3/fan1_input"
name: HA Fan Speed
unit_of_measurement: "rpm"
##################################################
# Templates #
##################################################
template:
# Shower usage sensor
- binary_sensor:
- delay_on: 0:00:20
delay_off: 0:00:20
default_entity_id: binary_sensor.ensuite_shower_active
name: Ensuite Shower Active
state: '{{ states(''sensor.ensuite_shower_energy_power'') | float(0) > 4 }}'
- binary_sensor:
- delay_on: 0:00:20
delay_off: 0:00:20
default_entity_id: binary_sensor.family_bathroom_shower_active
name: Familiy Bathroom Shower Active
state: '{{ states(''sensor.family_bathroom_shower_energy_power'') | float(0) > 4 }}'
# Sensor to detect if Fraser PC has been idle for over 5 mins
- binary_sensor:
- default_entity_id: binary_sensor.tera_pc_idle
name: Frasers PC On but Idle
state: '{{as_timestamp(states.sensor.lastactive.last_changed) < as_timestamp(now()) - 300}}'
- sensor:
- default_entity_id: sensor.tera_powered_on
name: PC Tera Powered On
state: '{{ not(is_state(''switch.shutdown'', ''unavailable'')) }}'
- sensor:
- default_entity_id: sensor.sun_template
icon: '{% if is_state(''sun.sun'', ''above_horizon'') %}mdi:weather-sunny{% else %}mdi:weather-night{% endif %}'
name: Sun
state: '{{ as_timestamp(states.sun.sun.attributes.next_rising) | timestamp_custom(''%H:%M'', True) }} • {{ as_timestamp(states.sun.sun.attributes.next_setting) | timestamp_custom(''%H:%M'', True) }}'