-
Notifications
You must be signed in to change notification settings - Fork 0
/
configuration.yaml
executable file
·193 lines (162 loc) · 5.75 KB
/
configuration.yaml
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
homeassistant:
# Name of the location where Home Assistant is running
name: Pool
# Location required to calculate the time the sun rises and sets
latitude: 45.325
longitude: -75.9116
# Impacts weather/sunrise data (altitude above sea level in meters)
elevation: 76
# metric for Metric, imperial for Imperial
unit_system: metric
# Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
time_zone: America/Toronto
# Customization file
customize: !include customize.yaml
# Show links to resources in log and frontend
#introduction:
# Enables the frontend
frontend:
# Enables configuration UI
config:
http:
# Secrets are defined in the file secrets.yaml
# api_password: !secret http_password
# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# base_url: example.duckdns.org:8123
server_port: 80
# Checks for available updates
# Note: This component will send some information about your system to
# the developers to assist with development of Home Assistant.
# For more information, please see:
# https://home-assistant.io/blog/2016/10/25/explaining-the-updater/
#updater:
# Optional, allows Home Assistant developers to focus on popular components.
# include_used_components: true
# Discover some devices automatically
#discovery:
# Allows you to issue voice commands from the frontend in enabled browsers
#conversation:
# Enables support for tracking state changes over time
history:
# View all events in a logbook
logbook:
system_health:
# Enables a map showing the location of tracked devices
#map:
#
# Track the sun
sun:
lovelace:
mode: yaml
logger:
default: info
recorder:
exclude:
entities:
- sensor.time
sensor:
- platform: time_date
# - platform: darksky
# api_key: !secret darksky_key
# monitored_conditions:
# - nearest_storm_distance
# - cloud_cover
- platform: onewire
names:
28-0417c4b661ff: Air
28-0517c48e2cff: Raw Water
28-0417c441ccff: Raw Heat Pump
#Presure at the pool filter
- platform: command_line
name: Pump Pressure
command: "python /config/pool_pressure_sensor.py"
unit_of_measurement: "PSI"
value_template: '{{ value_json.psi }}'
command_timeout: 30
- platform: template
sensors:
#Detirming it the heat pump is running by calculate the diffrence of the water in temperature from the output temperature
heat_pump_status:
friendly_name: "Heating"
value_template: "{{ \"Yes\" if ( (float(states.sensor.raw_heat_pump_temperature.state) - float(states.sensor.raw_water_temperature.state)) > 1.5 and is_state('switch.pool_pump', 'on')and is_state('switch.pool_heat_pump', 'on') ) else \"No\" }}"
icon_template: "{{ \"mdi:radiator\" if ( (float(states.sensor.raw_heat_pump_temperature.state) - float(states.sensor.raw_water_temperature.state)) > 1.5 and is_state('switch.pool_pump', 'on')and is_state('switch.pool_heat_pump', 'on') ) else \"mdi:panorama-fisheye\" }}"
#Low presure when the pump is running
pump_low_presure:
value_template: "{{float(states(\"sensor.pump_pressure\")) < 1 and is_state('switch.pool_pump', 'on')}}"
icon_template: mdi:mdi-gauge
#Has presure in water lines
pump_has_presure:
value_template: "{{float(states(\"sensor.pump_pressure\")) > 1 and is_state('switch.pool_pump', 'on')}}"
icon_template: mdi:mdi-gauge
#Water temperature when the presure is up, prevents the temperature being outputted when no water is running in the pipes
water_temperature:
value_template: "{{ states.sensor.raw_water_temperature.state if ( is_state('input_boolean.water_temperature_accurate', 'on')) else '-' }}"
unit_of_measurement: °C
icon_template: mdi:thermometer
friendly_name: Water
#Heat pump output temperature when the presure is up, prevents the temperature being outputted when no water is running in the pipes
heat_pump_temperature:
value_template: "{{ states.sensor.raw_heat_pump_temperature.state if ( is_state('input_boolean.water_temperature_accurate', 'on')) else '-' }}"
unit_of_measurement: °C
icon_template: mdi:thermometer
friendly_name: Heat Pump
#Save the weekday start and stop times for the pump and heater
#On none week days pump and heater run 24 hours a day
input_datetime:
pump_start_time:
name: Pump Start Time
has_date: false
has_time: true
pump_stop_time:
name: Pump Stop Time
has_date: false
has_time: true
heat_pump_start_time:
name: Heat Pump Start Time
has_date: false
has_time: true
heat_pump_stop_time:
name: Heat Pump Stop Time
has_date: false
has_time: true
input_select:
pump_control:
name: Pump Control
options:
- "Automatic"
- "Manual"
heat_pump_control:
name: Heat Pump Control
options:
- "Automatic"
- "Manual"
input_boolean:
water_temperature_accurate:
initial: off
binary_sensor:
- platform: workday
country: CA
switch:
- platform: rpi_gpio
ports:
17: Pool Pump
27: Pool Heat Pump
invert_logic: true
python_script:
ifttt:
key: !secret ifttt_key
notify:
- name: notify_pool
platform: smtp
server: smtp.gmail.com
port: 587
timeout: 15
sender: !secret gmail_account
encryption: starttls
username: !secret gmail_account
password: !secret gmail_account_password
recipient: !secret notification_recipients
sender_name: Pool Controller
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml