Skip to content

Commit f2affda

Browse files
committed
keeping things up to date
working on nest changes still, fix for presence and updated lovelace to match
1 parent 29ea9ee commit f2affda

20 files changed

+1016
-315
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,4 @@ custom_components
7070
packages/zones.yaml
7171
www/ssl.txt
7272
www/ssl.txt
73+
ip_bans.yaml

configuration.yaml

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
###### Configuration
22
homeassistant:
3+
auth_providers:
4+
- type: trusted_networks
5+
trusted_networks:
6+
- 192.168.1.1
37
name: " "
48
whitelist_external_dirs:
59
- /docker/database-home_assistant/
@@ -132,6 +136,8 @@ tplink:
132136
- host: 192.168.1.108
133137
switch:
134138
- host: 192.168.1.211
139+
- host: 192.168.1.239
140+
- host: 192.168.1.238
135141

136142
mqtt:
137143
broker: !secret mqtt_url
@@ -175,10 +181,8 @@ cast:
175181
media_player:
176182
- platform: plex
177183
entity_namespace: 'plex'
178-
include_non_clients: true
179184
scan_interval: 5
180185
show_all_controls: false
181-
use_custom_entity_ids: true
182186
use_episode_art: true
183187
remove_unavailable_clients: true
184188
client_remove_interval: 600

packages/backyard.yaml

+33-16
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,43 @@ homeassistant:
88
icon: mdi:amplifier
99

1010
automation:
11-
###### NOTIFY IF FILTER IS CLOGGED
12-
- alias: 'Pool Filter is clogged'
11+
###### TURN ON THE LIGHTS AT NIGHT
12+
- alias: 'light_backyard'
1313
initial_state: 'on'
1414
trigger:
15-
- platform: numeric_state
16-
entity_id: sensor.pool_draw
17-
below: 37
18-
for: '00:00:05'
15+
- platform: state
16+
entity_id: binary_sensor.door_back
17+
from: 'off'
18+
to: 'on'
19+
for: '00:00:03'
1920
condition:
20-
- condition: numeric_state
21-
entity_id: sensor.pool_draw
22-
above: 20
21+
- condition: state
22+
entity_id: sun.sun
23+
state: 'below_horizion'
2324
action:
24-
- service: switch.turn_off
25-
entity_id: switch.pool_pump
26-
- service: script.janet_speech_engine
27-
data:
28-
call_greeting: 1
29-
data_template:
30-
CustomMessage: 'The Pool Filter needs Cleaning!'
25+
- service: light.turn_on
26+
entity_id: light.deck_lights
27+
28+
###### NOTIFY IF FILTER IS CLOGGED
29+
# - alias: 'Pool Filter is clogged'
30+
# initial_state: 'on'
31+
# trigger:
32+
# - platform: numeric_state
33+
# entity_id: sensor.pool_draw
34+
# below: 37
35+
# for: '00:00:05'
36+
# condition:
37+
# - condition: numeric_state
38+
# entity_id: sensor.pool_draw
39+
# above: 20
40+
# action:
41+
# - service: switch.turn_off
42+
# entity_id: switch.pool_pump
43+
# - service: script.janet_speech_engine
44+
# data:
45+
# call_greeting: 1
46+
# data_template:
47+
# CustomMessage: 'The Pool Filter needs Cleaning!'
3148
####### AUTOMATIC CONTROL OF AMPLIFIER
3249
- alias: "Backyard Amp Off"
3350
initial_state: 'on'

packages/camera.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ homeassistant:
88

99
#stream:
1010
camera:
11-
# - platform: mjpeg
12-
# name: findlay
13-
# mjpeg_url: !secret dlink_camera_mjpeg
14-
# still_image_url: !secret dlink_still_image_url
15-
# username: !secret dlink_camera_username
16-
# password: !secret dlink_camera_password
11+
- platform: mjpeg
12+
name: octoprint
13+
mjpeg_url: !secret dlink_camera_mjpeg
14+
still_image_url: !secret dlink_still_image_url
15+
username: !secret dlink_camera_username
16+
password: !secret dlink_camera_password
1717

1818
- platform: mjpeg
1919
name: nursery

packages/doorbell.yaml

+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
################################################################
2+
## Packages / Doorbell
3+
################################################################
4+
homeassistant:
5+
automation:
6+
- alias: 'doorbell'
7+
initial_state: 'on'
8+
trigger:
9+
- platform: event
10+
event_type: zha_event
11+
event_data:
12+
unique_id: '0xf0c1:1:0x0006'
13+
device_ieee: '00:15:8d:00:03:26:94:9a'
14+
command: 'attribute_updated'
15+
action:
16+
- service: media_player.volume_set
17+
data_template:
18+
entity_id: media_player.google_home
19+
volume_level: >
20+
{% if is_state('input_boolean.finn_sleep', 'off') %} 1
21+
{% elif is_state('input_boolean.finn_sleep', 'on') %} 0.40
22+
{% endif %}
23+
- service: media_player.play_media
24+
data_template:
25+
entity_id: media_player.google_home
26+
media_content_id: >
27+
http://192.168.1.115/doorbell_tones/
28+
{%- if is_state('input_select.theme', "New Year's Day") -%} new_years.mp3
29+
{%- elif is_state('input_select.theme', "Groundhog Day") -%} groundhog_day.mp3
30+
{%- elif is_state('input_select.theme', "Valentine's Day") -%} valentines_day.mp3
31+
{%- elif is_state('input_select.theme', "St. Patrick's Day") -%} door_1.mp3
32+
{%- elif is_state('input_select.theme', "Good Friday") -%} door_1.mp3
33+
{%- elif is_state('input_select.theme', "Starwars Day") -%} R2D2.mp3
34+
{%- elif is_state('input_select.theme', "Easter Sunday") -%} door_1.mp3
35+
{%- elif is_state('input_select.theme', "Earth Day") -%} door_1.mp3
36+
{%- elif is_state('input_select.theme', "Mother's Day") -%} door_1.mp3
37+
{% elif is_state('input_select.theme', "Victoria Day") -%} door_1.mp3
38+
{%- elif is_state('input_select.theme', "Father's Day") -%} get-to-the-choppa.mp3
39+
{%- elif is_state('input_select.theme', "Canada Day") -%} door_1.mp3
40+
{%- elif is_state('input_select.theme', "Labour Day") -%} door_1.mp3
41+
{%- elif is_state('input_select.theme', "Thanksgiving Day") -%} door_1.mp3
42+
{%- elif is_state('input_select.theme', "Halloween") -%} halloween.wav
43+
{%- elif is_state('input_select.theme', "Remembrance Day") -%} door_1.mp3
44+
{%- elif is_state('input_select.theme', "Christmas Eve") -%} xmas.mp3
45+
{%- elif is_state('input_select.theme', "Christmas Day") -%} xmas.mp3
46+
{%- elif is_state('input_select.theme', "Boxing Day") -%} xmas.mp3
47+
{%- elif is_state('input_select.theme', "New Year's Eve") -%} new_years.mp3
48+
{%- else -%} door_1.mp3
49+
{%- endif -%}
50+
media_content_type: 'audio/mp3'
51+
52+
##############
53+
# - alias: 'guard dog'
54+
# initial_state: 'on'
55+
# trigger:
56+
# - platform: state
57+
# entity_id: binary_sensor.front_doorbell
58+
# from: 'off'
59+
# to: 'on'
60+
# condition:
61+
# condition: or
62+
# conditions:
63+
# - condition: state
64+
# entity_id: 'input_boolean.away'
65+
# state: 'on'
66+
# - condition: state
67+
# entity_id: 'input_boolean.vacation'
68+
# state: 'on'
69+
# action:
70+
# - service: media_player.volume_set
71+
# data:
72+
# entity_id: media_player.google_home
73+
# volume_level: 1.00
74+
# - service: media_player.play_media
75+
# data_template:
76+
# entity_id: media_player.google_home
77+
# media_content_id: "http://192.168.1.115/misc_sound/dog-barking-2-bullmastiff.mp3"
78+
# media_content_type: 'audio/mp3'
79+
# - service: notify.html5
80+
# data:
81+
# message: 'Someone is at the front door, Release the Hounds!'
82+
83+
sensor:
84+
- platform: template
85+
sensors:
86+
theme_sound:
87+
friendly_name: 'Doorbell Sound'
88+
value_template: >
89+
{%- if is_state('input_select.theme', "New Year's Day") -%} new_years.mp3
90+
{%- elif is_state('input_select.theme', "Groundhog Day") -%} groundhog_day.mp3
91+
{%- elif is_state('input_select.theme', "Valentine's Day") -%} valentines_day.mp3
92+
{%- elif is_state('input_select.theme', "St. Patrick's Day") -%} door_1.mp3
93+
{%- elif is_state('input_select.theme', "Good Friday") -%} door_1.mp3
94+
{%- elif is_state('input_select.theme', "Starwars Day") -%} R2D2.mp3
95+
{%- elif is_state('input_select.theme', "Easter Sunday") -%} door_1.mp3
96+
{%- elif is_state('input_select.theme', "Earth Day") -%} door_1.mp3
97+
{%- elif is_state('input_select.theme', "Mother's Day") -%} door_1.mp3
98+
{% elif is_state('input_select.theme', "Victoria Day") -%} door_1.mp3
99+
{%- elif is_state('input_select.theme', "Father's Day") -%} get-to-the-choppa.mp3
100+
{%- elif is_state('input_select.theme', "Canada Day") -%} door_1.mp3
101+
{%- elif is_state('input_select.theme', "Labour Day") -%} door_1.mp3
102+
{%- elif is_state('input_select.theme', "Thanksgiving Day") -%} door_1.mp3
103+
{%- elif is_state('input_select.theme', "Halloween") -%} halloween.wav
104+
{%- elif is_state('input_select.theme', "Remembrance Day") -%} door_1.mp3
105+
{%- elif is_state('input_select.theme', "Christmas Eve") -%} xmas.mp3
106+
{%- elif is_state('input_select.theme', "Christmas Day") -%} xmas.mp3
107+
{%- elif is_state('input_select.theme', "Boxing Day") -%} xmas.mp3
108+
{%- elif is_state('input_select.theme', "New Year's Eve") -%} new_years.mp3
109+
{%- else -%} door_1.mp3
110+
{%- endif -%}
111+
icon_template: "{% if is_state('sun.sun', 'above_horizon') %}mdi:speaker-wireless{% else %}mdi:speaker{% endif %}"

packages/janet.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ input_number:
2727
min: 0.0
2828
max: 1.0
2929
step: 0.01
30-
initial: 1.0
30+
initial: 0.6
3131

3232
janet_notification_witty:
3333
name: Witty
@@ -43,6 +43,7 @@ input_select:
4343
icon: mdi:speaker
4444
options:
4545
- "Google Home"
46+
- "Master Bedroom Speaker"
4647
initial: "Google Home"
4748

4849

@@ -82,6 +83,7 @@ script:
8283
"I just want to inform you that ",
8384
"I just want to let you know that ",
8485
"You asked me to inform you when ",
86+
"Okay. I've hacked into the mainframe and",
8587
"I thought you'd like to know that "
8688
] %}
8789
{{ inform|random }}

packages/nest.yaml

+52-33
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
homeassistant:
55
customize:
66
#Nest Thermostat
7-
climate.hallway:
8-
friendly_name: Nest Thermostat
9-
entity_picture: /local/custom_icons/nest.png
107
binary_sensor.hallway_thermostat_fan:
118
friendly_name: Thermostat Fan
129
icon: mdi:fan
@@ -89,24 +86,69 @@ switch:
8986
fan_mode: 'off'
9087
nest_away:
9188
value_template: >-
92-
{%-set away = states.climate.hallway.attributes.away_mode-%}
93-
{%-if away == 'on' -%}
89+
{%-set away = states.climate.hallway.attributes.preset_mode-%}
90+
{%-if away == 'away' -%}
9491
on
9592
{%- else -%}
9693
off
9794
{%- endif -%}
9895
turn_on:
99-
service: climate.set_away_mode
96+
service: climate.set_preset_mode
10097
data:
10198
entity_id: climate.hallway
102-
away_mode: 'true'
99+
preset_mode: 'away'
103100
turn_off:
104-
service: climate.set_away_mode
101+
service: climate.set_preset_mode
105102
data:
106103
entity_id: climate.hallway
107-
away_mode: 'false'
104+
preset_mode: 'none'
105+
input_text:
106+
# A variable to store Nest's current mode - used when we restore from away mode
107+
nest_mode:
108+
name: Heating/Cooling Mode
108109

109110
automation:
111+
###### SET STATE WHEN WINDOWS TOGGLED
112+
- alias: 'nest_to_off_windows_open'
113+
initial_state: 'on'
114+
trigger:
115+
- platform: state
116+
entity_id: binary_sensor.kitchen_window
117+
from: 'off'
118+
to: 'on'
119+
action:
120+
# Save the current mode for Nest so we can restore it later
121+
- service: input_text.set_value
122+
data_template:
123+
entity_id: input_text.nest_mode
124+
value: '{{ states.climate.hallway.state }}'
125+
# Set Nest to Eco mode
126+
- service: climate.set_preset_mode
127+
data:
128+
entity_id: climate.hallway
129+
preset_mode: 'eco'
130+
- alias: 'nest_to_on_windows_closed'
131+
initial_state: 'on'
132+
trigger:
133+
- platform: state
134+
entity_id: binary_sensor.kitchen_window
135+
from: 'on'
136+
to: 'off'
137+
condition:
138+
condition: and
139+
conditions:
140+
# House is currently in eco mode
141+
- condition: template
142+
value_template: '{{ is_state_attr("climate.hallway", "preset_mode", "eco") }}'
143+
# The last state was successfully saved/set
144+
- condition: template
145+
value_template: '{{ states.input_text.nest_mode.state != "unknown" }}'
146+
action:
147+
# Restore Nest to the orgional mode
148+
- service: climate.set_hvac_mode
149+
data_template:
150+
entity_id: climate.hallway
151+
operation_mode: '{{ states.input_text.nest_mode.state }}'
110152
###### Nest protect states are - ok warning emergency
111153
- alias: 'notify if nest protect is not ok'
112154
initial_state: 'on'
@@ -154,31 +196,8 @@ sensor:
154196
nest_operation_mode:
155197
friendly_name: "Operation Mode"
156198
entity_id: climate.hallway
157-
value_template: "{{states.climate.hallway.attributes.operation_mode}}"
199+
value_template: "{{states.climate.hallway.state}}"
158200
nest_away_mode:
159201
friendly_name: "Operation Mode"
160202
entity_id: climate.hallway
161203
value_template: "{{states.climate.hallway.attributes.away_mode}}"
162-
163-
# - alias: 'nest open a window'
164-
# initial_state: 'on'
165-
# trigger:
166-
# - platform: state
167-
# entity_id: sensor.weather_inside_vs_outside
168-
# from: 'false'
169-
# to: 'true'
170-
# condition:
171-
# - condition: state
172-
# entity_id: climate.hallway
173-
# state: 'cool'
174-
# action:
175-
# - service: notify.html5
176-
# data:
177-
# message: 'It is cooler outside then inside and the AC is on. You should open a window!'
178-
# - service: automation.turn_off
179-
# data:
180-
# entity_id: automation.nest_open_a_window
181-
# - delay: '01:00:00'
182-
# - service: automation.turn_on
183-
# data:
184-
# entity_id: automation.nest_open_a_window

packages/network.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,15 @@ sensor:
7171
value_template: '{{ value_json.ip }}'
7272
scan_interval: 14400
7373
###### CUSTOM DATA USAGE PYTHON SCRIPT
74+
# - platform: ssh
75+
# name: usage_test
76+
# host: !secret skullcanyon_host
77+
# username: !secret skullcanyon_user
78+
# password: !secret skullcanyon_pass
79+
# command: !secret internet_usage_test
80+
# value_template: >-
81+
# {{value.split("\r\n")[1]}}
82+
7483
- platform: command_line
7584
command: !secret internet_usage
7685
name: 'usage'

0 commit comments

Comments
 (0)