initial push

This commit is contained in:
CeeWeasel
2024-04-14 14:08:56 -04:00
commit 53bf393d14
1111 changed files with 71730 additions and 0 deletions
+83
View File
@@ -0,0 +1,83 @@
www/Default Profile.properties
.DS_Store
.google.token
.HA_VERSION
.uuid
.vscode
.shopping_list.json
.ip_authenticated.yaml
.watchman_report.txt
watchman_report.txt
.vacuum
.storage/
.cloud/
.automatic/
.tts.token
customize.yaml
image/
open-zwave/
zigbee2mqtt/
scenes.yaml.orig
www/community
deps/
tts/*.mp3
www/*.html
www/*.png
www/*.jpg
www/*.mp3
www/audio
www/Default*Profile.properties
node-red/
media/
custom_components/
custom_logs/
snapshots/
rtl_433/
components/packages/openmindsai/openminds_sensor.yaml
/lovelace/private
secrets.yaml
google_calendars.yaml
*calendars*.*
known*.yaml
scenes.yaml
automations.yaml
scripts.yaml
ip_bans.yaml
frigate.yaml
frigate.yml
#frigate*.yaml
#frig*.yml
swatch.yaml
swatch*.yaml
rtl_433.conf
*.conf.template*
go2rtc-1.0.0
go2rtc.yaml
nest.conf
harmony_harmony_hub.conf
html5_push_registrations.conf
notify.log
home-assistant_v2.db
*.db*
home-assistant.log
*.log*
OZW_Log.txt
pyozw.sqlite
*.xml
*.py
*.pyc
*.js
*.json
**/*.json
*.json*
*.csv
*.csv*
**/*.csv
+49
View File
@@ -0,0 +1,49 @@
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAACFwAAAAdzc2gtcn
NhAAAAAwEAAQAAAgEAm/7yR8fpiwGnzFsibB4osWS1QpWoXSpPDO/LGWicHZqm+BNv799J
F0xsWxORnqpiDm9gssPrLZyBR4yqHkAQ/f3bc6wjc+rDWjh5hcKm9KOZg6esqsFQNjpGTX
wcjFU1oy+UCAeT3aY6MC/doKQ2WscpSaRzPe52213IqP6Abt0emhWjCKS2yC8lktqhQc9u
WRB75KmAB/ZXYuPO48PjmOEpIhSfG57PYB7YXAWFEG6wmkoQDx10ACGH7MJFUY0YXeqkzY
/x8FLx+sIXAWx8RaOYtXe9pwjPnaziDNMlrdtgIq3OVFOutKQxKEma5iQr5xT2kbmG26rE
IfpmTUBu+YCgdC2kySg8xGdpHnardIhX9tsBHAp+JZEd0nZUF89oGeUq9eRCjojniCaEWU
V3FOnJuhKaFBeon2E2R8psaQTDLHFytBGMZzoqUNDOOrKsSLtQnuMrc13uu7BAhuM6jAp8
iQeHZTB/7S0VibMqQ0B0ARJJaE62HZmGbRlOAALScA61jWPuOobSzp5abhE/1gnebW/41a
x+zNroq64c4if5WGc6nOPB8BnCRE5rGewRvjJVfqytlVCVTbUOSnnLR5U1FClckF05kUnP
j0f1EmlkX+8SuVxxYXJfhgBFOyiBEGBh5v8Yca22JDbjVYE4GWyCmRK4Cn29P1IBUS8f2p
cAAAdAaZRbYmmUW2IAAAAHc3NoLXJzYQAAAgEAm/7yR8fpiwGnzFsibB4osWS1QpWoXSpP
DO/LGWicHZqm+BNv799JF0xsWxORnqpiDm9gssPrLZyBR4yqHkAQ/f3bc6wjc+rDWjh5hc
Km9KOZg6esqsFQNjpGTXwcjFU1oy+UCAeT3aY6MC/doKQ2WscpSaRzPe52213IqP6Abt0e
mhWjCKS2yC8lktqhQc9uWRB75KmAB/ZXYuPO48PjmOEpIhSfG57PYB7YXAWFEG6wmkoQDx
10ACGH7MJFUY0YXeqkzY/x8FLx+sIXAWx8RaOYtXe9pwjPnaziDNMlrdtgIq3OVFOutKQx
KEma5iQr5xT2kbmG26rEIfpmTUBu+YCgdC2kySg8xGdpHnardIhX9tsBHAp+JZEd0nZUF8
9oGeUq9eRCjojniCaEWUV3FOnJuhKaFBeon2E2R8psaQTDLHFytBGMZzoqUNDOOrKsSLtQ
nuMrc13uu7BAhuM6jAp8iQeHZTB/7S0VibMqQ0B0ARJJaE62HZmGbRlOAALScA61jWPuOo
bSzp5abhE/1gnebW/41ax+zNroq64c4if5WGc6nOPB8BnCRE5rGewRvjJVfqytlVCVTbUO
SnnLR5U1FClckF05kUnPj0f1EmlkX+8SuVxxYXJfhgBFOyiBEGBh5v8Yca22JDbjVYE4GW
yCmRK4Cn29P1IBUS8f2pcAAAADAQABAAACAA4ZyYS7iVzLVYOfaUkkoMEIPWo7ZPCm9mZQ
9qbhUdtLM3SRLTkdkdnNSq4g4rTY6ewsHS2LkCKbVwRErsv1NpP+8mtOUBYWTnpFSJbStY
y/jQzdhzoYJ0v/kINIiLwWp7aMgnEHXlJWyEO6z+nJbjBeeFjzyIb8mznRDGZaOvnKew2q
jwYk/XCy8k6H/LOaMHtUhh5xQ+V0WwnRVc440sXq9HDkNE2m2U/y+dO3nAOUPdp0f2ceXn
H0lfjMxr9MZbt3jlYWgOQcW0szaCj0yXbyBsfAfyAuJ7Y0/mnyXCGPBu2bkF8HAW/Kt7bQ
kHPlKSLGPlOF1a7djMUVgVHSVTWMThdnz7XlpY67FCMZAKYnvqha4XIArRWIgJ2qHs1pWZ
V2r1NUsotUbo1P/tFFrWelIxXrcznRdC65PUKeBWw08hfnDw06PbQVRaxoJVLOy6plILAF
Mi7r1Lcjalm1nIp6Z0LR09+xElWdewtHZAaY8SXbLLqvraGZERDRqEIrIVQIG7V9qd1Lni
S2KIDv5R0GHgXfuAa1VxY0DZrejb+GMK6zmf+p9EM4wUZl2HqRnwZlqEL7jXA6LswYSMzM
UEgCE24ulBPtyWub/bua3/KJIrxwU/+mZArqRntrn1xaoCed4J5pVOrgK6s3YxxHmSkOE6
CuLxjTBMMkIdPHmzpBAAABAEMVDWKMfeWDHQTTZvZbpFUUVDzPYFfKDE4lC5+Ky3a4N+tE
FCE+rmEv/SJzm+yVab7PcVwOmANgDArPVpfVJaKjuLfUBNodW9KeZiKRlQcdlDqcCaV8b0
AqwJSqUR4QGobzMMtuJOq50LTnArgRVqb1BinDIu30ELuaxX/5QwVN7V8MqjSCzLKBqnN8
e0wUxp1gQSZhwjNC/GQI65OwdOJq/u1rRA2PIEL0BK4rxIMN+ojF+IF7hpb7LNSXyJLOSi
rkp3Gm+e7gE5CXPL98gGNwGW8axglY3B4UiBbbbIo/TZ5cvd4El9H/lyX+JIdgpkWcfEnZ
fmb7kU3cIJLUAbAAAAEBAMj1Afsk2+8logcPkmdYb9Rd1oFZQ5G9OiL01R1Nt9/syZuqyq
dnZMNkJudHy1QwzD5wc15haQcz1pxBeZlHYY+k260wjrN/qirzlWgQ3hZ7BDd0Jk7v+hxv
bVwahu/c7Sf3fh+98R1mSwh4Vj9+3exsmw17ir2oclpdkVpg3A/spaPrRcouptAzJ1W4na
IjNbL2cP4p0byWF4mn9vMuUEVaj9xipZmuCl5xkQ8BugC1J+KDAK8yruICr4U5e+a6/nm0
ldasuDaDXxto3bEWOrKsHVEfrXVRaeIeaMDRMSPsWYOJcig7A7kAzLOJr9MkMrSWoTnCrG
/J76pbT/kO6bkAAAEBAMa5SX5r+W/oyuI2tX8AFXP8MkLCxeJofqKdkuxHN07E1Cot+aCD
Wd6rO/kNIxiR8A6ffx5OOG5nSzbeg2BVKOOloA7N+Wfy4ewMT0ugBXxHr/9R9q7BxyB/Wb
tHfDxi+a4RsdZiidBKQ0DC2c6fNcA/dLKV89jypfHHHPe/3BErUKoRFOT3+R2rkPjkk2YI
4Yoc4Wda7IriKNKOte7vWCdod85mbmOp4r/JvHJz5qgNPtEtNsgMoJ1JOn0PL3+oNlZMG1
zJqhdE6jZLZl7iaWJ73YlcUR1qPR/WY4Jmuu/Q8bgEWXGZqTLTnkCG8yzkVmqgI1Q27DlE
zlHetJLuzs8AAAAGaGFzc2lvAQIDBAU=
-----END OPENSSH PRIVATE KEY-----
+1
View File
@@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCb/vJHx+mLAafMWyJsHiixZLVClahdKk8M78sZaJwdmqb4E2/v30kXTGxbE5GeqmIOb2Cyw+stnIFHjKoeQBD9/dtzrCNz6sNaOHmFwqb0o5mDp6yqwVA2OkZNfByMVTWjL5QIB5PdpjowL92gpDZaxylJpHM97nbbXcio/oBu3R6aFaMIpLbILyWS2qFBz25ZEHvkqYAH9ldi487jw+OY4SkiFJ8bns9gHthcBYUQbrCaShAPHXQAIYfswkVRjRhd6qTNj/HwUvH6whcBbHxFo5i1d72nCM+drOIM0yWt22Airc5UU660pDEoSZrmJCvnFPaRuYbbqsQh+mZNQG75gKB0LaTJKDzEZ2kedqt0iFf22wEcCn4lkR3SdlQXz2gZ5Sr15EKOiOeIJoRZRXcU6cm6EpoUF6ifYTZHymxpBMMscXK0EYxnOipQ0M46sqxIu1Ce4ytzXe67sECG4zqMCnyJB4dlMH/tLRWJsypDQHQBEkloTrYdmYZtGU4AAtJwDrWNY+46htLOnlpuET/WCd5tb/jVrH7M2uirrhziJ/lYZzqc48HwGcJETmsZ7BG+MlV+rK2VUJVNtQ5KectHlTUUKVyQXTmRSc+PR/USaWRf7xK5XHFhcl+GAEU7KIEQYGHm/xhxrbYkNuNVgTgZbIKZErgKfb0/UgFRLx/alw== hassio
+1
View File
@@ -0,0 +1 @@
1699634302.417708
+709
View File
@@ -0,0 +1,709 @@
- # home-assistant
Making a small change here and there and here but not there nor here
What about after a restore?jasd wtf?!?!
still a problem?
Test for new one
Hit the extensions button in VS Code (which looks like building blocks on the left toolbar)
Search for @builtin TypeScript.
Disable the TypeScript and Javascript Language Features extension
Reload
- # Notes
* Check the state of a script
```yaml
- condition: state
entity_id: script.<scriptname>
state: 'on'
```
* Is git going to break every time now?
I really hope this fucking works now...
* Check if trigger exists?
```yaml
{{ trigger.from_state.state != trigger.to_state.state if defined(trigger) else false }}
```
or
```yaml
{{ trigger.from_state and trigger.from_state.attributes.mains | lower != 'unknown' }}
{% if is_state("input_select.computer_area_mode", "Auto") and is_state("script.computer_area_auto", "off") %}
{% if trigger.from_state and trigger.from_state.attributes.mains | lower != 'unknown' %} from {{trigger.from_state.state}}{% endif %}{% if trigger.to_state and trigger.to_state.attributes.mains | lower != 'unknown' %} to {{trigger.to_state.state}} {% endif %}
ran {% if defined(trigger)%}because {{ trigger.entity_id }} changed{% endif %}{% if trigger.from_state and trigger.from_state.attributes.mains | lower != 'unknown' %}from {{trigger.from_state.state}}{% endif %}{% if trigger.to_state and trigger.to_state.attributes.mains | lower != 'unknown' %} to {{trigger.to_state.state}}{% endif %}
{{ trigger.entity_id }} changed from {{ trigger.from_state and trigger.from_state.attributes.mains | lower != 'unknown' }} to {{ trigger.to_state and trigger.to_state.attributes.mains | lower != 'unknown' }}
```
This is how to actuall do it!
```yaml
- service: notify.logfile
data_template:
message: >
{{ states("sensor.date_time_iso") }} Computer Area Motion On ran
```
* Check if stuff is on just after a system restart
```yaml
- platform: template
value_template: >
{{ is_state('binary_sensor.nursery_multisensor_home_security_motion_detection','off') and states('sensor.nursery_last_motion') | int <= 300 and states('sensor.system_uptime') | int >= 5 }}
prob_given_true: 0.8
- platform: template
value_template: >
{{ is_state('binary_sensor.nursery_multisensor_home_security_motion_detection','off') and states('sensor.nursery_last_motion') | int > 300 and states('sensor.nursery_last_motion') | int <= 600 and states('sensor.system_uptime') | int >= 5 }}
prob_given_true: 0.6
- platform: template
value_template: >
{{ is_state('binary_sensor.nursery_multisensor_home_security_motion_detection','off') and states('sensor.nursery_last_motion') | int > 600 and states('sensor.nursery_last_motion') | int <= 900 and states('sensor.system_uptime') | int >= 10 }}
prob_given_true: 0.4
```
- # Hue Colors
Colors that are listed in gray italics do not work. All other colors have been tested successfully on Philip Hue bulbs.
## Basic English Color Terms
- #FFFFFF White
- #000000 Black
- #FF0000 Red
- #FF7F00 Orange
- #FFFF00 Yellow
- #00FF00 Green
- #0000FF Blue
- #800080 Purple
- #FFC0CB Pink
- #A52A2A Brown
- #808080 Gray
## RGB Color Wheel
- #FF0000 Red
- #FF7F00 Orange
- #FFFF00 Yellow
- #7FFF00 Chartreuse
- #00FF00 Green
- #00FF7F Spring Green
- #00FFFF Cyan
- #007FFF Azure
- #0000FF Blue
- #7F00FF Violet
- #FF00FF Magenta
- #FF007F Rose
## HTML Color Names
- #F0F8FF Alice Blue
- #FAEBD7 Antique White
- #00FFFF Aqua
- #7FFFD4 Aquamarine
- #F0FFFF Azure
- #F5F5DC Beige
- ~~#FFE4C4 Bisque~~
- #000000 Black
- ~~#FFEBCD Blanched Almond~~
- #0000FF Blue
- #8A2BE2 Blue Violet
- #A52A2A Brown
- ~~#DEB887 BurlyWood~~
- #5F9EA0 Cadet Blue
- #7FFF00 Chartreuse
- #D2691E Chocolate
- #FF7F50 Coral
- #6495ED Cornflower Blue
- ~~#FFF8DC Cornsilk~~
- #DC143C Crimson
- #00FFFF Cyan
- #00008B Dark Blue
- #008B8B Dark Cyan
- #B8860B Dark Goldenrod
- #A9A9A9 Dark Gray
- #006400 Dark Green
- #BDB76B Dark Khaki
- #8B008B Dark Magenta
- #556B2F Dark Olive Green
- #FF8C00 Dark Orange
- #9932CC Dark Orchid
- #8B0000 Dark Red
- #E9967A Dark Salmon
- ~~#8FBC8F Dark Sea Green~~
- ~~#483D8B Dark Slate Blue~~
- #2F4F4F Dark Slate Gray
- #00CED1 Dark Turquoise
- #9400D3 Dark Violet
- #FF1493 Deep Pink
- #00BFFF Deep Sky Blue
- #696969 Dim Gray
- #1E90FF Dodger Blue
- #B22222 Fire Brick
- #FFAF0 Floral White
- #228B22 Forest Green
- #FF00FF Fuschia
- ~~#DCDCDC Gainsboro~~
- #F8F8FF Ghost White
- #FFD700 Gold
- #DAA520 Goldenrod
- #808080 Gray
- #008000 Green
- #ADFF2F Green Yellow
- #F0FFF0 Honeydew
- #FF69B4 Hot Pink
- #CD5C5C Indian Red
- #4B0082 Indigo
- #FFFFF0 Ivory
- #F0E68C Khaki
- #E6E6FA Lavender
- #FFF0F5 Lavender Blush
- #7CFC00 Lawn Green
- #FFFACD Lemon Chiffon
- #ADD8E6 Light Blue
- #F08080 Light Coral
- #E0FFFF Light Cyan
- #FAFAD2 Light Goldenrod Yellow
- #D3D3D3 Light Gray
- #90EE90 Light Green
- #FFB6C1 Light Pink
- #FFA07A Light Salmon
- #20B2AA Light Sea Green
- #87CEFA Light Sky Blue
- #778899 Light Slate Gray
- #B0C4DE Light Steel Blue
- #FFFFE0 Light Yellow
- #00FF00 Lime
- #32CD32 Lime Green
- #FAF0E6 Linen
- #FF00FF Magenta
- #800000 Maroon
- #66CDAA Medium Aquamarine
- #0000CD Medium Blue
- ~~#BA55D3 Medium Orchid~~
- #9370DB Medium Purple
- #3CB371 Medium Sea Green
- ~~#7B68EE Medium Slate Blue~~
- #00FA9A Medium Spring Green
- #48D1CC Medium Turquoise
- ~~#C71585 Medium Violet Red~~
- #191970 Midnight Blue
- #F5FFFA Mint Cream
- #FFE4E1 Misty Rose
- ~~#FFE4B5 Moccasin~~
- #FFDEAD Navajo White
- #000080 Navy
- #FDF5E6 Old Lace
- #808000 Olive
- #6B8E23 Olive Drab
- #FFA500 Orange
- #FF4500 Orange Red
- #DA70D6 Orchid
- ~~#EEE8AA Pale Goldenrod~~
- ~~#98FB98 Pale Green~~
- ~~#AFEEEE Pale Turquoise~~
- ~~#DB7093 Pale Violet Red~~
- #FFEFD5 Papaya Whip
- #FFDAB9 Peach Puff
- #CD853F Peru
- #FFC0CB Pink
- #DDA0DD Plum
- #B0E0E6 Powder Blue
- #800080 Purple
- ~~#663399 Rebecca Purple~~
- #FF0000 Red
- ~~#BC8F8F Rosy Brown~~
- #4169E1 Royal Blue
- ~~#8B4513 Saddle Brown~~
- #FA8072 Salmon
- #F4A460 Sandy Brown
- #2E8B57 Sea Green
- #FFF5EE Seashell
- #A0522D Sienna
- #C0C0C0 Silver
- #87CEEB Sky Blue
- #6A5ACD Slate Blue
- #708090 Slate Gray
- #FFFAFA Snow
- #00FF7F Spring Green
- #4682B4 Steel Blue
- #D2B48C Tan
- #008080 Teal
- #D8BFD8 Thistle
- #FF6347 Tomato
- #40E0D0 Turquoise
- #EE82EE Violet
- #F5DEB3 Wheat
- #FFFFFF White
- #F5F5F5 White Smoke
- #FFFF00 Yellow
- #9ACD32 Yellow Green
## RYB Color Wheel
- #FF0000 Red
- ~~#FF5349 Vermilion~~
- #FFA500 Orange
- #FFCC00 Amber
- #FFFF00 Yellow
- #7FFF00 Chartreuse
- #008000 Green
- #008080 Teal
- #0000FF Blue
- #7F00FF Violet
- #800080 Purple
- #FF00FF Magenta
## ROYGBIV Traditional Rainbow
- #FF0000 Red
- #FFA500 Orange
- #FFFF00 Yellow
- #00FF00 Green
- #0000FF Blue
- #4B0082 Indigo
- #7F00FF Violet
## School/Sports Teams
- #9E1B32 Alabama Crimson
- #1E4D2B Cal Poly Pomona Green
- #00563B Castleton Green
- #B31B1B Cornell Red
- #00693E Dartmouth Green
- #FE5A1D Giants Orange
- #A51C30 Harvard Crimson
- #7D110C IU Crimson (Indiana University)
- #512888 KSU Purple (Kansas State University)
- #004953 MSU Green (Michigan State University)
- #841617 Oklahoma Crimson
- #EE7F2D Princeton Orange
- #76FF7A Sacramento State Green
- #CC0000 Utah Crimson
- #FF8200 UT Orange (University of Tennessee)
## Other Proprietary Colors
- #A4C639 Android Green
- #DA1884 Barbie Pink
- #00AB66 GO Green (GO Transit, Toronto)
- #81D8D0 Tiffany Blue
## Crayola Crayon Colors
### Standard Colors
- ~~#EED9C4 Almond~~
- ~~#C88A65 Antique Brass~~
- #FDD5B1 Apricot
- #85E0E8 Aquamarine
- #7BA05B Asparagus
- ~~#FBE7B2 Banana Mania~~
- #926F5B Beaver
- #FE6F5E Bittersweet
- #000000 Black
- #0066FF Blue
- #9999CC Blue Bell
- #C8C8CD Blue-Gray
- #9985B7 Blue-Green
- #6456B7 Blue-Violet
- #DB5079 Blush
- #C62D42 Brick Red
- #E667CE Brilliant Rose
- #AF593E Brown
- #FF7F49 Burnt Orange
- #E97451 Burnt Sienna
- #805533 Burnt Umber
- #A9B2C3 Cadet Blue
- ~~#FFFF99 Canary~~
- #00CC99 Caribbean Green
- #E62E6B Carmine
- #FFA6C9 Carnation Pink
- #7070CC Celestial Blue
- #DA3287 Cerise
- #02A4D3 Cerulean
- #339ACC Cerulean Blue
- #736A62 Charcoal Gray
- #8C90C8 Cobalt Blue
- #DA8A67 Copper
- #93CCEA Cornflower
- #FFB7D5 Cotton Canddy
- #FED85D Dandelion
- #B33B24 Dark Venetian Red
- #1560BD Denim
- #EDC9AF Desert Sand
- #614051 Eggplant
- #CC474B English Vermilion
- #63B76C Fern
- #5FA777 Forest Green
- #C154C1 Fuschia
- #87421F Fuzzy Wuzzy
- #E6BE8A Gold
- #FCD667 Goldenrod
- #9DE093 Granny Smith Apple
- #8B8680 Gray
- #3AA655 Green
- #2887C8 Green-Blue
- #F1E788 Green-Yellow
- ~~#AFE313 Inchworm~~
- #B9FE48 Indian Red
- #4F69C6 Indigo
- #A50B5E Jazzberry Jam
- #29AB87 Jungle Green
- #FBAED2 Lavender
- #FFFF9F Lemon Yellow
- #8FD8D8 Light Blue
- #BEE64B Light Chrome Green
- #E6735C Light Venetian Red
- #FFB97B Macaroni and Cheese
- #CC3336 Madder Lake
- #F653A6 Magenta
- #CA3435 Mahogany
- #F2C649 Maize
- #8D90A1 Manatee
- #E77200 Mango Tango
- #C32148 Maroon
- #F091A9 Mauvelous
- #6CA67C Medium Chrome Green
- #D96CBE Medium Rose
- #8F47B3 Medium Violet
- #FEBAAD Melon
- #00468C Midnight Blue
- #1AB385 Mountain Meadow
- #C8509B Mulberry
- #0066CC Navy Blue
- #B5B35C Olive Green
- #FF8833 Orange
- #FF5349 Orange-Red
- #F8D568 Orange-Yellow
- #E29CD2 Orchid
- #2D383A Outer Space
- #009DC4 Pacific Blue
- #FFCBA4 Peach
- #C3CDE6 Periwinkle
- #E12C2C Permanent Geranium Lake
- #FDD7E4 Pig Pink
- #01786F Pine Green
- #FC74FD Pink Flamingo
- #F7A38E Pink Sherbert
- #8E3179 Plum
- #652DC1 Purple Heart
- #D6AEDD Purple Mountain Majesty
- #D27D46 Raw Sienna
- #665233 Raw Umber
- #E30B5C Razzmatazz
- #ED0A3F Red
- #FF681F Red-Orange
- #BB3385 Red-Violet
- #00CCCC Robin Egg Blue
- #6B3FA0 Royal Purple
- #FF91A4 Salmon
- ~~#FD0E35 Scarlet~~
- #93DFB8 Sea Green
- #9E5B40 Sepia
- #837050 Shadow
- #33CC99 Shamrock
- #C9C0BB Silver
- #76D7EA Sky Blue
- #ECEBBD Spring Green
- #FE4C40 Sunset Orange
- #D99A6C Tan
- #008080 Teal Blue
- #EBB0D7 Thistle
- #FC80A5 Tickle Me Pink
- #D9D6CF Timberwolf
- #00755E Tropical Rain Forest
- #DEA681 Tumbleweed
- #6CDAE7 Turquoise Blue
- #3F26BF Ultramarine Blue
- #664228 Van Dyke Brown
- #CC553D Venetian Red
- #8359A3 Violet (Purple)
- #766EC8 Violet-Blue
- #F7468A Violet-Red
- #FF9980 Vivid Tangerine
- #803790 Vivid Violet
- #FFFFFF White
- #7A89B8 Wild Blue Yonder
- #FF3399 Wild Strawberry
- #C9A0DC Wisteria
- #FBE870 Yellow
- #C5E17A Yellow-Green
- #FFAE42 Yellow-Orange
### Fluorescent Colors
- #FF355E Radical Red
- #FD5B78 Wild Watermelon
- #FF6037 Outrageous Orange
- #FF9966 Atomic Tangerine
- #FF9933 Neon Carrot
- #FFCC33 Sunglow
- #FFFF66 Laser Lemon
- #FFFF66 Unmellow Yellow
- #CCFF00 Electric Lime
- #66FF66 Screamin' Green
- #AAF0D1 Magic Mint
- #50BFE6 Blizzard Blue
- #FF6EFF Shocking Pink
- #EE34D2 Razzle Dazzle Rose
- #FF00CC Hot Magenta
- #FF00CC Purple Pizzazz
### Silver Swirls
- #C39953 Aztec Gold
- #A17A74 Burnished Brown
- #6D9BC3 Cerulean Frost
- #CD607E Cinnamon Satin
- #AD6F69 Copper Penny
- #2E2D88 Cosmic Cobalt
- #AB92B3 Glossy Grape
- #676767 Granite Gray
- #6EAEA1 Green Sheen
- #AE98AA Lilac Luster
- #BBB477 Misty Moss
- #AD4379 Mystic Maroon
- #B768A2 Pearly Purple
- #8BA8B7 Pewter Blue
- #5DA493 Polished Pine
- #A6A6A6 Quick Silver
- #9E5E6F Rose Dust
- #DA2C43 Rusty Red
- #778BA5 Shadow Blue
- #5FA778 Shiny Shamrock
- #5F8A8B Steel Teal
- #914E75 Sugar Plum
- #8A496B Twilight Lavender
- #56887D Wintergreen Dream
### Gem Tones
- #64609A Amethyst
- #933709 Citrine
- #14A989 Emerald
- #469A84 Jade
- ~~#D05340 Jasper~~
- #436CB9 Lapis Lazuli
- #469496 Malachite
- ~~#3AA8C1 Moonstone~~
- #353839 Onyx
- ~~#ABAD48 Peridot~~
- ~~#B07080 Pink Pearl~~
- #BD559C Rose Quartz
- #AA4069 Ruby
- #2D5DA1 Sapphire
- #832A0D Smokey Topaz
- ~~#B56917 Tiger's Eye~~
## Unclassified Colors
### Shades of Red
- #A52A2A Auburn
- #F4C2C2 Baby Pink
- #7C0A02 Barn Red
- #000020 Burgundy
- #8A3324 Burnt Umber
- #E30022 Cadmium Red
- #CE2029 Cardinal
- #954535 Chesnut
- #E23D28 Chili Red
- #F88379 Congo Pink
- #F88379 Coral Pink
- #EA3C53 Desire
- #CE2029 Fire Engine Red
- #ED2939 Imperial Red
- #D7837F New York Pink
- #E63E62 Paradise Pink
- #DEA5A4 Pastel Pink
- #ED1C24 Pigment Red
- #B7410E Rust
- #FF91A4 Salmon Pink
- #E4717A Tango Pink
- #A91101 Turkey Red
- #F3D9DF Vanilla Ice
- #722F37 Wine
### Shades of Orange
- #9F8170 Beaver
- #ED872D Cadmium Orange
- #ED9121 Carrot Orange
- #F7E7CE Champagne
- #7B3F00 Chocolate
- #D2691E Cocoa Brown
- #EDC9AF Desert Sand
- #E25822 Flame
- #E49B0F Gamboge
- #FF4F00 International Orange
- #6B4423 Kobicha
- #C19A6B Lion
- #EAA221 Marigold
- #FF9F00 Orange Peel
- #D99058 Persian Orange
- #EC5800 Persimmon
- #CD853F Peru
- #FF5A36 Portland Orange
- #FF7518 Pumpkin
- #80461B Russet
- #FF7900 Safety Orange
- #F4A460 Sandy Brown
- #D2B48C Tan
- #483C32 Taupe
- #CD5700 Tawny
- #F88379 Tea Rose
- #C19A6B Wood Brown
### Shades of Yellow
- #FFBF00 Amber
- #F5F5DC Beige
- #F0DC82 Buff
- #E4D00A Citrine
- #FFFDD0 Cream
- #FFD300 Cyber Yellow
- #C2B280 Ecru
- #E6A817 Harvest Gold
- #F8DE7E Jasmine
- #F4CA16 Jonquil
- #C3B091 Khaki
- #FFF44F Lemon
- #F8DE7E Mellow Yellow
- #FFC40C Mikado Yellow
- #FFDB58 Mustard
- #FADA5E Naples Yellow
- #CFB53B Old Gold
- #FFEF00 Process Yellow
- #FADA5E Royal Yellow
- #EED202 Safety Yellow
- #F4C430 Saffron
- #FFD800 School Bus Yellow
- #E4D96F Straw
- #F3E5AB Vanilla
### Shades of Green
- #4B5320 Army Green
- #8F9779 Artichoke
- #87A96B Asparagus
- #568203 Avacado
- #006A4E Bottle Green
- #4FFFB0 Bright Mint
- #ACE1AF Celadon
- #50C878 Emerald
- #4F7942 Fern Green
- #228B22 Forest Green
- #3FFF00 Harlequin
- #355E3B Hunter Green
- #138808 India Green
- #009000 Islamic Green
- #00A86B Jade
- #4CBB17 Kelly Green
- #A9BA9D Laurel Green
- #0BDA51 Malachite
- #74C365 Mantis
- #98FB98 Mint Green
- #8A9A5B Moss Green
- #39FF14 Neon Green
- #808000 Olive
- #006600 Pakistan Green
- #50C878 Paris Green
- #444C38 Rifle Green
- #679267 Russian Green
- #2E8B57 Sea Green
- #009E60 Shamrock Green
- #008000 Slytherin Green
### Shades of Cyan
- #00FFFF Aqua
- #7FFFD4 Aquamarine
- #1B4D3E Brunswick Green
- #2F847C Celadon Green
- #B2FFFF Celeste
- #007BA7 Cerulean
- #232B2B Charleston Green
- #008B8B Dark Cyan
- #7DF9FF Electric Blue
- #4D5D53 Feldgrau
- #5E716A Gray Green
- #004953 Midnight Green
- #8DA399 Morning Blue
- #317873 Myrtle Green
- #00A693 Persian Green
- #00CCCC Robin Egg Blue
- #80DAEB Sky Blue
- #008080 Teal
- #367588 Teal Blue
- #40E0D0 Turquoise
- #43B3AE Verdigris
- #40826D Viridian
### Shades of Blue
- #007FFF Azure
- #89CFF0 Baby Blue
- #6699CC Blue Gray
- #00BFFF Capri
- #6495ED Cornflower
- #1034A6 Egyptian Blue
- #6082B6 Glaucous
- #4C516D Independence
- #4B0082 Indigo
- #00416A Indigo Dye
- #545AA7 Liberty
- #ADD8E6 Light Blue
- #191970 Midnight Blue
- #000080 Navy (Blue)
- #CCCCFF Periwinkle
- #B0E0E6 Powder Blue
- #002387 Resolution Blue
- #082567 Sapphire
- #1D2951 Space Cadet
- #4682B4 Steel Blue
- #3F00FF Ultramarine
### Shades of Purple
- #702963 Byzantium
- #301934 Dark Purple
- #6F00FF Electric Indigo
- #6C3082 Eminence
- #DF73FF Heliotrope
- #4B0082 Indigo
- #00416A Indigo Dye
- #880085 Mardi Gras
- #E0B0FF Mauve
- #9370DB Medium Purple
- #DA70D6 Orchid
- #78184A Pansy Purple
- #DF00FF Phlox
- #9A4EAE Purpureus
- #D8BFD8 Thistle
- #9683EC Tropical Indigo
- #66023C Tyrian Purple
- #7851A9 Royal Purple
### Shades of Magenta
- #AB274F Amaranth
- #915C83 Antique Fuchsia
- #F4C2C2 Baby Pink
- #EFBBCC Cameo Pink
- #FFA6C9 Carnation Pink
- #E68FAC Charm Pink
- #DE6FA1 China Pink
- #FFBCD9 Cotton Candy
- #8B008B Dark Magenta
- #B53389 Fandango
- #FD3F92 French Fuchsia
- #FD6C9E French Pink
- #C74575 Fuchsia Rose
- #9F4576 Magenta Haze
- #FFDAE9 Mimi Pink
- #F77FBE Persian Pink
- #FDDDE6 Piggy Pink
- #FFC0CB Pink
- #FFDDF4 Pink Lace
- #DBB2D1 Pink Lavender
- #8E4585 Plum
- #E8CCD7 Queen Pink
- #FF007F Rose
- #AA98A9 Rose Quartz
- #FC0FC0 Shocking Pink
- #C4AEAD Silver Pink
- #CF71AF Sky Magenta
- #CF6BA9 Super Pink
### Shades of Gray
- #B2BEB5 Ash Gray
- #848482 Battleship Gray
- #91A3B0 Cadet Gray
- #36454F Charcoal
- #696969 Dim Gray
- #727472 Gunmetal
- #343434 Jet
- #4C5866 Marengo
- #727472 Nickel
- #E5E4E2 Platinum
- #8A7F8D Rocket Metallic
- #C0C0C0 Silver
- #708090 Slate Gray
+104
View File
@@ -0,0 +1,104 @@
alias: "Battery Alert"
id: automation_battery_alert
initial_state: off
trigger:
- platform: time
at: "10:00:00"
- platform: time
at: "18:00:00"
condition:
condition: or
conditions:
- condition: template
value_template: >-
{%- set threshold = 40 -%}
{%- for item in states.light if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown")) -%}
{%- if loop.first -%}
{{ true }}
{%- endif -%}
{%- endfor -%}
- condition: template
value_template: >-
{%- set threshold = 40 -%}
{%- for item in states.switch if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown")) -%}
{%- if loop.first -%}
{{ true }}
{%- endif -%}
{%- endfor -%}
- condition: template
value_template: >-
{%- set threshold = 40 -%}
{%- for item in states.sensor if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown")) -%}
{%- if loop.first -%}
{{ true }}
{%- endif -%}
{%- endfor -%}
- condition: template
value_template: >-
{%- set threshold = 40 -%}
{%- for item in states.zwave if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown")) -%}
{%- if loop.first -%}
{{ true }}
{%- endif -%}
{%- endfor -%}
- condition: template
value_template: >-
{%- set threshold = 40 -%}
{%- for item in states.lock if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown")) -%}
{%- if loop.first -%}
{{ true }}
{%- endif -%}
{%- endfor -%}
action:
- service: notify.mobile_app_pixel_7
data:
message: >-
{% set threshold = 1 %}
{%- for item in states.light if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int / 5 < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown")) -%}
{%- if loop.first -%}
{% for lobat in states.light if (lobat.attributes.battery_level is defined and lobat.attributes['battery_level'] | int / 5 < threshold) or ("battery" in lobat.name | lower and ((item.state | int < threshold and lobat.state|int != 0) or lobat.state | lower == "low" or lobat.state | lower == "unknown")) %}
{%- if loop.first %}Lights:{% endif %}
{{ lobat.name }} {{ lobat.state }}%
{%- endfor -%}
{% endif %}
{%- endfor %}
{% set threshold = 1 %}
{%- for item in states.switch if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int / 5 < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown")) -%}
{%- if loop.first -%}
{% for lobat in states.switch if (lobat.attributes.battery_level is defined and lobat.attributes['battery_level'] | int / 5 < threshold) or ("battery" in lobat.name | lower and ((item.state | int < threshold and lobat.state|int != 0) or lobat.state | lower == "low" or lobat.state | lower == "unknown")) %}
{%- if loop.first %}Switches:{% endif %}
{{ lobat.name }} {{ lobat.state }}%
{%- endfor -%}
{% endif %}
{%- endfor %}
{% set threshold = 1 %}
{%- for item in states.sensor if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int / 5 < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown")) -%}
{%- if loop.first -%}
{% for lobat in states.sensor if (lobat.attributes.battery_level is defined and lobat.attributes['battery_level'] | int / 5 < threshold) or ("battery" in lobat.name | lower and ((item.state | int < threshold and lobat.state|int != 0) or lobat.state | lower == "low" or lobat.state | lower == "unknown")) %}
{%- if loop.first %}Sensors:{% endif %}
{{ lobat.name }} {{ lobat.state }}%
{%- endfor -%}
{% endif %}
{%- endfor %}
{% set threshold = 1 %}
{%- for item in states.zwave if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int / 5 < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown")) -%}
{%- if loop.first -%}
{% for lobat in states.zwave if (lobat.attributes.battery_level is defined and lobat.attributes['battery_level'] | int / 5 < threshold) or ("battery" in lobat.name | lower and ((item.state | int < threshold and lobat.state|int != 0) or lobat.state | lower == "low" or lobat.state | lower == "unknown")) %}
{%- if loop.first %}Zwaves:{% endif %}
{{ lobat.name }} {{ lobat.state }}%
{%- endfor -%}
{% endif %}
{%- endfor %}
{% set threshold = 1 %}
{%- for item in states.lock if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int / 5 < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown")) -%}
{%- if loop.first -%}
{% for lobat in states.lock if (lobat.attributes.battery_level is defined and lobat.attributes['battery_level'] | int / 5 < threshold) or ("battery" in lobat.name | lower and ((item.state | int < threshold and lobat.state|int != 0) or lobat.state | lower == "low" or lobat.state | lower == "unknown")) %}
{%- if loop.first %}Locks:{% endif %}
{{ lobat.name }} {{ lobat.state }}%
{%- endfor -%}
{% endif %}
{%- endfor %}
@@ -0,0 +1,69 @@
alias: "Battery Alert Template"
id: automation_battery_alert_template
initial_state: off
trigger:
- platform: time
at: "10:00:00"
- platform: time
at: "18:00:00"
condition:
condition: or
conditions:
- condition: template
value_template: >-
{%- set threshold = 40 -%}
{%- for item in states.light if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown")) -%}
{%- if loop.first -%}
{{ true }}
{%- endif -%}
{%- endfor -%}
- condition: template
value_template: >-
{%- set threshold = 40 -%}
{%- for item in states.switch if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown")) -%}
{%- if loop.first -%}
{{ true }}
{%- endif -%}
{%- endfor -%}
- condition: template
value_template: >-
{%- set threshold = 40 -%}
{%- for item in states.sensor if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown")) -%}
{%- if loop.first -%}
{{ true }}
{%- endif -%}
{%- endfor -%}
- condition: template
value_template: >-
{%- set threshold = 40 -%}
{%- for item in states.zwave if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown")) -%}
{%- if loop.first -%}
{{ true }}
{%- endif -%}
{%- endfor -%}
- condition: template
value_template: >-
{%- set threshold = 40 -%}
{%- for item in states.lock if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown")) -%}
{%- if loop.first -%}
{{ true }}
{%- endif -%}
{%- endfor -%}
- condition: template
value_template: >-
{%- set threshold = 40 -%}
{%- for item in states.binary_sensor if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown")) -%}
{%- if loop.first -%}
{{ true }}
{%- endif -%}
{%- endfor -%}
action:
- service: notify.mobile_app_pixel_7
data:
message: >-
{% set threshold = 40 %}
{% for item in states.binary_sensor if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int / 5 < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown")) %}
{%- if loop.first %}Binary Sensors:{% endif %}
{{ item.name }} {{ item.attributes.battery_level / 5 }}%
{%- endfor -%}
@@ -0,0 +1,26 @@
alias: "Alert that something is open and the HVAC equipment is on"
id: automation_something_open_hvac_on
trigger:
platform: state
entity_id: binary_sensor.something_open_hvac_on
from: "off"
to: "on"
action:
- service: notify.mobile_app_pixel_7
data:
message: >-
The following are open: "{{ dict((states|selectattr('entity_id', 'in', state_attr('group.my_hvac_affecting_openings', 'entity_id'))|list)|groupby('state'))['on']|map(attribute='name')|list|join(', ') }}"
data:
channel: "Alerts"
importance: high
actions:
- action: "ALARM" # The key you are sending for the event
title: "Sound Alarm" # The button title
- action: "URI" # Must be set to URI if you plan to use a URI
title: "Open Url"
uri: "https://google.com" # URL to open when action is selected, can also be a lovelace view/dashboard
- action: "URI"
title: "Adjust Thermostat"
uri: "entityId:climate.thermostat"
+53
View File
@@ -0,0 +1,53 @@
alias: Camera06 Preset
id: automation_camera06_preset
mode: restart
trigger:
- platform: state
entity_id: input_select.camera_06
- platform: homeassistant
event: start
- platform: time_pattern
minutes: "/30"
action:
- choose:
- conditions:
- condition: state
entity_id: input_select.camera_06
state: 'Static'
sequence:
- service: shell_command.master_bedroom_left_preset_1
- conditions:
- condition: state
entity_id: input_select.camera_06
state: 'Door'
sequence:
- service: shell_command.master_bedroom_left_preset_3
- conditions:
- condition: state
entity_id: input_select.camera_06
state: 'Bed'
sequence:
- service: shell_command.master_bedroom_left_preset_3
- conditions:
- condition: state
entity_id: input_select.camera_06
state: 'Window'
sequence:
- service: shell_command.master_bedroom_left_preset_2
- conditions:
- condition: state
entity_id: input_select.camera_06
state: 'Floor'
sequence:
- service: shell_command.master_bedroom_left_preset_4
- conditions:
- condition: state
entity_id: input_select.camera_06
state: 'Privacy'
sequence:
- service: shell_command.master_bedroom_left_preset_5
+52
View File
@@ -0,0 +1,52 @@
alias: Camera07 Preset
id: automation_camera07_preset
mode: restart
trigger:
- platform: state
entity_id: input_select.camera_07
- platform: homeassistant
event: start
- platform: time_pattern
minutes: "/30"
action:
- choose:
- conditions:
- condition: state
entity_id: input_select.camera_07
state: 'Static'
sequence:
- service: shell_command.master_bedroom_right_preset_2
- conditions:
- condition: state
entity_id: input_select.camera_07
state: 'Door'
sequence:
- service: shell_command.master_bedroom_right_preset_1
- conditions:
- condition: state
entity_id: input_select.camera_07
state: 'Bed'
sequence:
- service: shell_command.master_bedroom_right_preset_3
- conditions:
- condition: state
entity_id: input_select.camera_07
state: 'Window'
sequence:
- service: shell_command.master_bedroom_right_preset_2
- conditions:
- condition: state
entity_id: input_select.camera_07
state: 'Floor'
sequence:
- service: shell_command.master_bedroom_right_preset_4
- conditions:
- condition: state
entity_id: input_select.camera_07
state: 'Privacy'
sequence:
- service: shell_command.master_bedroom_right_preset_5
+303
View File
@@ -0,0 +1,303 @@
alias: Cycle Cameras
id: automation_cycle_cameras
mode: queued
trigger:
- id: automatic
platform: homeassistant
event: start
- id: automatic
platform: time_pattern
seconds: "/10"
- id: cam01
platform: state
entity_id: binary_sensor.frigate_cam01_person_occupancy
from: 'off'
to: 'on'
- id: cam03
platform: state
entity_id: binary_sensor.frigate_cam03_person_occupancy
from: 'off'
to: 'on'
- id: cam04
platform: state
entity_id: binary_sensor.frigate_cam04_person_occupancy
from: 'off'
to: 'on'
- id: cam06
platform: state
entity_id: binary_sensor.frigate_cam06_person_occupancy
from: 'off'
to: 'on'
- id: cam07
platform: state
entity_id: binary_sensor.frigate_cam07_person_occupancy
from: 'off'
to: 'on'
- id: cam08
platform: state
entity_id: binary_sensor.frigate_cam08_person_occupancy
from: 'off'
to: 'on'
- id: cam12
platform: state
entity_id: binary_sensor.frigate_cam12_person_occupancy
from: 'off'
to: 'on'
- id: cam13
platform: state
entity_id: binary_sensor.frigate_cam13_person_occupancy
from: 'off'
to: 'on'
- id: cam14
platform: state
entity_id: binary_sensor.frigate_cam14_person_occupancy
from: 'off'
to: 'on'
- id: cam19
platform: state
entity_id: binary_sensor.frigate_cam19_person_occupancy
from: 'off'
to: 'on'
action:
- service: input_select.select_next
data: {}
target:
entity_id: input_select.master_bedroom_camera
- choose:
- conditions:
- condition: trigger
id: cam01
- condition: state
entity_id: input_boolean.indoor_camera_lock
state: 'off'
sequence:
- service: input_select.select_option
target:
entity_id: input_select.indoor_camera_cycle
data:
option: Blue Room
- conditions:
- condition: trigger
id: cam03
- condition: state
entity_id: input_boolean.indoor_camera_lock
state: 'off'
sequence:
- service: input_select.select_option
target:
entity_id: input_select.indoor_camera_cycle
data:
option: Computer Area
- conditions:
- condition: trigger
id: cam04
- condition: state
entity_id: input_boolean.outdoor_camera_lock
state: 'off'
sequence:
- service: input_select.select_option
target:
entity_id: input_select.outdoor_camera_cycle
data:
option: Garage
- conditions:
- condition: trigger
id: cam06
- condition: state
entity_id: input_boolean.indoor_camera_lock
state: 'off'
sequence:
- service: input_select.select_option
target:
entity_id: input_select.indoor_camera_cycle
data:
option: Bedroom Left
- conditions:
- condition: trigger
id: cam07
- condition: state
entity_id: input_boolean.indoor_camera_lock
state: 'off'
sequence:
- service: input_select.select_option
target:
entity_id: input_select.indoor_camera_cycle
data:
option: Bedroom Right
- conditions:
- condition: trigger
id: cam08
- condition: state
entity_id: input_boolean.indoor_camera_lock
state: 'off'
sequence:
- service: input_select.select_option
target:
entity_id: input_select.indoor_camera_cycle
data:
option: Nursery
- conditions:
- condition: trigger
id: cam12
- condition: state
entity_id: input_boolean.indoor_camera_lock
state: 'off'
sequence:
- service: input_select.select_option
target:
entity_id: input_select.indoor_camera_cycle
data:
option: Kitchen
- conditions:
- condition: trigger
id: cam13
- condition: state
entity_id: input_boolean.indoor_camera_lock
state: 'off'
sequence:
- service: input_select.select_option
target:
entity_id: input_select.indoor_camera_cycle
data:
option: Front Room
- conditions:
- condition: trigger
id: cam14
- condition: state
entity_id: input_boolean.outdoor_camera_lock
state: 'off'
sequence:
- service: input_select.select_option
target:
entity_id: input_select.outdoor_camera_cycle
data:
option: Back Yard
- conditions:
- condition: trigger
id: cam19
- condition: state
entity_id: input_boolean.outdoor_camera_lock
state: 'off'
sequence:
- service: input_select.select_option
target:
entity_id: input_select.outdoor_camera_cycle
data:
option: Front Porch
default:
- choose:
- conditions:
- condition: trigger
id: automatic
- condition: state
entity_id: input_boolean.indoor_camera_lock
state: 'off'
- condition: or
conditions:
- condition: and
conditions:
- condition: state
entity_id: input_select.indoor_camera_cycle
state: Blue Room
- condition: state
entity_id: binary_sensor.frigate_cam01_person_occupancy
state: 'off'
- condition: and
conditions:
- condition: state
entity_id: input_select.indoor_camera_cycle
state: Computer Area
- condition: state
entity_id: binary_sensor.frigate_cam03_person_occupancy
state: 'off'
- condition: and
conditions:
- condition: state
entity_id: input_select.indoor_camera_cycle
state: Bedroom Left
- condition: state
entity_id: binary_sensor.frigate_cam06_person_occupancy
state: 'off'
- condition: and
conditions:
- condition: state
entity_id: input_select.indoor_camera_cycle
state: Bedroom Right
- condition: state
entity_id: binary_sensor.frigate_cam07_person_occupancy
state: 'off'
- condition: and
conditions:
- condition: state
entity_id: input_select.indoor_camera_cycle
state: Nursery
- condition: state
entity_id: binary_sensor.frigate_cam08_person_occupancy
state: 'off'
- condition: and
conditions:
- condition: state
entity_id: input_select.indoor_camera_cycle
state: Kitchen
- condition: state
entity_id: binary_sensor.frigate_cam12_person_occupancy
state: 'off'
- condition: and
conditions:
- condition: state
entity_id: input_select.indoor_camera_cycle
state: Front Room
- condition: state
entity_id: binary_sensor.frigate_cam13_person_occupancy
state: 'off'
sequence:
- service: input_select.select_next
data: {}
target:
entity_id: input_select.indoor_camera_cycle
- choose:
- conditions:
- condition: trigger
id: automatic
- condition: state
entity_id: input_boolean.outdoor_camera_lock
state: 'off'
- condition: or
conditions:
- condition: and
conditions:
- condition: state
entity_id: input_select.outdoor_camera_cycle
state: Garage
- condition: state
entity_id: binary_sensor.frigate_cam04_person_occupancy
state: 'off'
- condition: and
conditions:
- condition: state
entity_id: input_select.outdoor_camera_cycle
state: Back Yard
- condition: state
entity_id: binary_sensor.frigate_cam14_person_occupancy
state: 'off'
- condition: and
conditions:
- condition: state
entity_id: input_select.outdoor_camera_cycle
state: Front Porch
- condition: state
entity_id: binary_sensor.frigate_cam19_person_occupancy
state: 'off'
sequence:
- service: input_select.select_next
data: {}
target:
entity_id: input_select.outdoor_camera_cycle
@@ -0,0 +1,69 @@
alias: Frigate Cam04 Detect
id: automation_frigate_cam04_detect
mode: restart
trigger:
- platform: homeassistant
event: start
- id: motion
platform: state
entity_id: group.garage_motion
- id: doors
platform: state
entity_id: group.my_garage_doors
- id: occupancy
platform: state
entity_id: binary_sensor.frigate_cam04_person_occupancy
action:
- choose:
- conditions:
- condition: state
entity_id: group.garage_motion
state: 'on'
- condition: state
entity_id: switch.frigate_cam04_detect
state: 'off'
sequence:
- service: switch.turn_on
data: {}
target:
entity_id:
- switch.frigate_cam04_detect
- conditions:
- condition: state
entity_id: group.my_garage_doors
state: 'on'
- condition: state
entity_id: switch.frigate_cam04_detect
state: 'off'
sequence:
- service: switch.turn_on
data: {}
target:
entity_id:
- switch.frigate_cam04_detect
- conditions:
- condition: state
entity_id: group.garage_motion
state: 'off'
- condition: state
entity_id: group.my_garage_doors
state: 'off'
- condition: state
entity_id: binary_sensor.frigate_cam04_person_occupancy
state: 'off'
- condition: state
entity_id: switch.frigate_cam04_detect
state: 'on'
sequence:
- service: switch.turn_off
data: {}
target:
entity_id:
- switch.frigate_cam04_detect
+109
View File
@@ -0,0 +1,109 @@
alias: Frigate Recordings
id: automation_frigate_recordings
mode: restart
trigger:
- platform: homeassistant
event: start
- id: automatic
platform: time_pattern
minutes: "/10"
- id: boolean
platform: state
entity_id: input_boolean.debug_recordings
- id: indoors
platform: state
entity_id: input_boolean.indoor_recordings
- id: outdoors
platform: state
entity_id: input_boolean.outdoor_recordings
action:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.debug_recordings
state: 'on'
sequence:
- service: switch.turn_on
data: {}
target:
entity_id:
- switch.frigate_cam01_recordings
- switch.frigate_cam03_recordings
- switch.frigate_cam04_recordings
- switch.frigate_cam06_recordings
- switch.frigate_cam07_recordings
- switch.frigate_cam08_recordings
- switch.frigate_cam12_recordings
- switch.frigate_cam13_recordings
- switch.frigate_cam14_recordings
- switch.frigate_cam18_recordings
- switch.frigate_cam19_recordings
- choose:
- conditions:
- condition: state
entity_id: input_boolean.indoor_recordings
state: 'on'
sequence:
- service: switch.turn_on
data: {}
target:
entity_id:
- switch.frigate_cam01_recordings
- switch.frigate_cam03_recordings
- switch.frigate_cam06_recordings
- switch.frigate_cam07_recordings
- switch.frigate_cam08_recordings
- switch.frigate_cam12_recordings
- switch.frigate_cam13_recordings
- conditions:
- condition: state
entity_id: input_boolean.indoor_recordings
state: 'off'
sequence:
- service: switch.turn_off
data: {}
target:
entity_id:
- switch.frigate_cam01_recordings
- switch.frigate_cam03_recordings
- switch.frigate_cam06_recordings
- switch.frigate_cam07_recordings
- switch.frigate_cam08_recordings
- switch.frigate_cam12_recordings
- switch.frigate_cam13_recordings
- choose:
- conditions:
- condition: state
entity_id: input_boolean.outdoor_recordings
state: 'on'
sequence:
- service: switch.turn_on
data: {}
target:
entity_id:
- switch.frigate_cam04_recordings
- switch.frigate_cam14_recordings
- switch.frigate_cam18_recordings
- switch.frigate_cam19_recordings
- conditions:
- condition: state
entity_id: input_boolean.outdoor_recordings
state: 'off'
sequence:
- service: switch.turn_off
data: {}
target:
entity_id:
- switch.frigate_cam04_recordings
- switch.frigate_cam14_recordings
- switch.frigate_cam18_recordings
- switch.frigate_cam19_recordings
+109
View File
@@ -0,0 +1,109 @@
alias: Frigate Snapshots
id: automation_frigate_snapshots
mode: restart
trigger:
- platform: homeassistant
event: start
- id: automatic
platform: time_pattern
minutes: "/10"
- id: boolean
platform: state
entity_id: input_boolean.debug_snapshots
- id: indoors
platform: state
entity_id: input_boolean.indoor_snapshots
- id: outdoors
platform: state
entity_id: input_boolean.outdoor_snapshots
action:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.debug_snapshots
state: 'on'
sequence:
- service: switch.turn_on
data: {}
target:
entity_id:
- switch.frigate_cam01_snapshots
- switch.frigate_cam03_snapshots
- switch.frigate_cam04_snapshots
- switch.frigate_cam06_snapshots
- switch.frigate_cam07_snapshots
- switch.frigate_cam08_snapshots
- switch.frigate_cam12_snapshots
- switch.frigate_cam13_snapshots
- switch.frigate_cam14_snapshots
- switch.frigate_cam18_snapshots
- switch.frigate_cam19_snapshots
- choose:
- conditions:
- condition: state
entity_id: input_boolean.indoor_snapshots
state: 'on'
sequence:
- service: switch.turn_on
data: {}
target:
entity_id:
- switch.frigate_cam01_snapshots
- switch.frigate_cam03_snapshots
- switch.frigate_cam06_snapshots
- switch.frigate_cam07_snapshots
- switch.frigate_cam08_snapshots
- switch.frigate_cam12_snapshots
- switch.frigate_cam13_snapshots
- conditions:
- condition: state
entity_id: input_boolean.indoor_snapshots
state: 'off'
sequence:
- service: switch.turn_off
data: {}
target:
entity_id:
- switch.frigate_cam01_snapshots
- switch.frigate_cam03_snapshots
- switch.frigate_cam06_snapshots
- switch.frigate_cam07_snapshots
- switch.frigate_cam08_snapshots
- switch.frigate_cam12_snapshots
- switch.frigate_cam13_snapshots
- choose:
- conditions:
- condition: state
entity_id: input_boolean.outdoor_snapshots
state: 'on'
sequence:
- service: switch.turn_on
data: {}
target:
entity_id:
- switch.frigate_cam04_snapshots
- switch.frigate_cam14_snapshots
- switch.frigate_cam18_snapshots
- switch.frigate_cam19_snapshots
- conditions:
- condition: state
entity_id: input_boolean.outdoor_snapshots
state: 'off'
sequence:
- service: switch.turn_off
data: {}
target:
entity_id:
- switch.frigate_cam04_snapshots
- switch.frigate_cam14_snapshots
- switch.frigate_cam18_snapshots
- switch.frigate_cam19_snapshots
+64
View File
@@ -0,0 +1,64 @@
alias: HVAC Fan Off
id: automation_hvac_fan_off
trigger:
# Has the fan been running for ten minutes?
- platform: state
entity_id: switch.thermostat_fan_mode
to: 'on'
for: '00:10:00'
# Did the system turn on?
- platform: state
entity_id: sensor.hvac_action
from: 'idle'
# Check the conditions every 5 minutes
- platform: time_pattern
minutes: '/5'
- platform: state
entity_id: input_boolean.allow_fan
to: 'off'
condition:
# Is the fan currently on?
- condition: state
entity_id: switch.thermostat_fan_mode
state: 'on'
- condition: or
conditions:
# Is it getting too warm outside?
- condition: and
conditions:
- condition: numeric_state
entity_id: sensor.thermostat_temperature
above: 68
- condition: state
entity_id: binary_sensor.warmer_outside
state: 'on'
# Is it getting too cool outside?
- condition: and
conditions:
- condition: numeric_state
entity_id: sensor.thermostat_temperature
below: 65
- condition: state
entity_id: binary_sensor.cooler_outside
state: 'on'
# Did the system turn on?
- condition: not
conditions:
- condition: state
entity_id: sensor.hvac_action
state: 'idle'
action:
- service: logbook.log
data_template:
name: HVAC Fan Off
entity_id: automation.hvac_fan_off
message: >
Turned off HVAC fan
- service: homeassistant.turn_off
entity_id: switch.thermostat_fan_mode
+102
View File
@@ -0,0 +1,102 @@
alias: HVAC Fan On
id: automation_hvac_fan_on
trigger:
# Has the fan been off for ten minutes?
- platform: state
entity_id: switch.thermostat_fan_mode
to: 'off'
for: '00:10:00'
# Did the temp just switch to just right?
- platform: state
entity_id: binary_sensor.temp_just_right
to: 'on'
# Did it just become cooler inside or outside?
- platform: state
entity_id: binary_sensor.cooler_outside
from: 'off'
to: 'on'
# Did it just become warmer inside or outside?
- platform: state
entity_id: binary_sensor.warmer_outside
from: 'off'
to: 'on'
# Is it starting to get too warm inside?
- platform: numeric_state
entity_id: sensor.thermostat_temperature
above: 80
# Is it starting to get too cool inside?
- platform: numeric_state
entity_id: sensor.thermostat_temperature
below: 60
condition:
- condition: state
entity_id: input_boolean.allow_fan
state: 'on'
# Are the internal sensors above 67?
# This is mainly to ensure those sensors are working
- condition: numeric_state
entity_id: sensor.return_temperature
above: 50
- condition: numeric_state
entity_id: sensor.hvac_temperature
above: 50
# Is the fan currently off?
- condition: state
entity_id: switch.thermostat_fan_mode
state: 'off'
# Is the system currently idle?
- condition: state
entity_id: sensor.hvac_action
state: 'idle'
# Is the home occupied?
- condition: state
entity_id: input_boolean.home_occupied
state: 'on'
# Is the outside temp just right?
- condition: state
entity_id: binary_sensor.temp_just_right
state: 'on'
# Is it getting too warm or too cold in the house?
- condition: or
conditions:
- condition: and
conditions:
- condition: numeric_state
entity_id: sensor.thermostat_temperature
above: 75
- condition: state
entity_id: binary_sensor.cooler_outside
state: 'on'
- condition: and
conditions:
- condition: numeric_state
entity_id: sensor.thermostat_temperature
below: 65
- condition: state
entity_id: binary_sensor.warmer_outside
state: 'on'
action:
- service: logbook.log
data_template:
name: HVAC Fan On
entity_id: automation.hvac_fan_on
message: >
Turned on HVAC fan
- service: homeassistant.turn_on
entity_id: switch.thermostat_fan_mode
@@ -0,0 +1,34 @@
alias: Frigate Notification Testing
id: automation_frigate_notification_testing
mode: single
max_exceeded: silent
trigger:
platform: mqtt
topic: frigate/events
condition:
- condition: or
conditions:
- "{{ 'driveway' in trigger.payload_json['after']['entered_zones'] }}"
- "{{ 'from_street' in trigger.payload_json['after']['entered_zones'] }}"
- "{{ trigger.payload_json['after']['label'] == 'person' }}"
action:
- choose:
- conditions:
- "{{ 'driveway' in trigger.payload_json['after']['entered_zones'] }}"
- "{{ 'from_street' in trigger.payload_json['after']['entered_zones'] }}"
- "{{ trigger.payload_json['after']['top_score'] > 0.80 }}"
- "{{ not 'garage' in trigger.payload_json['before']['current_zones'] }}"
sequence:
- service: notify.mobile_app_pixel_7
data_template:
message: 'A {{trigger.payload_json["after"]["label"]}} entered the driveway.'
data:
image: 'https://automation.clintweaver.com/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/thumbnail.jpg?format=android'
tag: '{{trigger.payload_json["after"]["id"]}}'
when: '{{trigger.payload_json["after"]["start_time"]|int}}'
- delay: '00:00:05'
@@ -0,0 +1,151 @@
id: automation_frigate_person_back_yard
alias: Frigate Person Back Yard
description: "Fire a notification if a person is detected by Frigate in the back yard"
mode: single
max_exceeded: silent
trigger:
platform: mqtt
topic: frigate/events
payload: frigate_cam14
value_template: "{{ value_json['after']['camera'] }}"
variables:
id: "{{ trigger.payload_json['after']['id'] }}"
camera: "{{ trigger.payload_json['after']['camera'] }}"
camera_name: "{{ camera | replace('_', ' ') | title }}"
object: "{{ trigger.payload_json['after']['label'] }}"
label: "{{ object | title }}"
entered_zones: "{{ trigger.payload_json['after']['entered_zones'] }}"
type: "{{ trigger.payload_json['type'] }}"
base_url: https://automation.clintweaver.com
group_target: ""
zone_only: false
input_zones:
- front_porch
- driveway
zones: "{{ input_zones | list }}"
input_labels:
- person
labels: "{{ input_labels | list }}"
presence_entity: person.clint
condition:
- "{{ type != 'end' }}"
- "{{ not zone_only or entered_zones|length > 0 }}"
- "{{ not zones|length or zones|select('in', entered_zones)|list|length > 0 }}"
- "{{ not labels|length or object in labels }}"
#- "{{ not presence_entity or not is_state(presence_entity, 'home') }}"
- '{{ is_state("binary_sensor.garage_door","off") }}'
- '{{ is_state("binary_sensor.outer_garage_door","off") }}'
- '{{ is_state("binary_sensor.front_door_contact","off") }}'
- '{{ is_state("binary_sensor.patio_door_contact","off") }}'
action:
- choose:
- conditions: "{{ not group_target }}"
sequence:
- device_id: 70c62eb366d6ed914b0ccc6bf41c32fd
domain: mobile_app
type: notify
message: A {{ label }} was detected on the {{ camera_name }} camera.
data:
tag: "{{ id }}"
group: frigate-notification-{{ camera }}
image: /api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
attachment:
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
- service: persistent_notification.create
data:
title: A {{ label }} was detected on the {{ camera_name }} camera.
message: 'A {{ label }} was detected on the {{ camera_name }} camera. ![image](https://automation.clintweaver.com/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/thumbnail.jpg)'
notification_id: "{{ id }}"
default:
- service: notify.{{ group_target }}
data:
message: A {{ label }} was detected on the {{ camera_name }} camera.
data:
tag: "{{ id }}"
group: frigate-notification-{{ camera }}
image: /api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
attachment:
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
- repeat:
sequence:
- wait_for_trigger:
- platform: mqtt
topic: frigate/events
payload: "{{ id }}"
value_template: "{{ value_json['after']['id'] }}"
timeout:
minutes: 2
continue_on_timeout: false
- condition: template
value_template: "{{ wait.trigger.payload_json['type'] == 'end' }}"
- choose:
- conditions: "{{ not group_target }}"
sequence:
- device_id: 70c62eb366d6ed914b0ccc6bf41c32fd
domain: mobile_app
type: notify
message: A {{ label }} was detected on the {{ camera_name }} camera.
data:
tag: "{{ id }}"
group: frigate-notification-{{ camera }}
url: >-
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
clickAction: >-
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
image: >-
/api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
sound: none
attachment:
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
actions:
- action: URI
title: View Clip
uri: >-
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
- action: URI
title: View Snapshot
uri: >-
{{base_url}}/api/frigate/notifications/{{id}}/snapshot.jpg
- action: silence-{{ camera }}
title: Silence Notifications
destructive: true
default:
- service: notify.{{ group_target }}
data:
message: A {{ label }} was detected on the {{ camera_name }} camera.
data:
tag: "{{ id }}"
group: frigate-notification-{{ camera }}
url: >-
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
clickAction: >-
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
image: >-
/api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
sound: none
attachment:
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
actions:
- action: URI
title: View Clip
uri: >-
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
- action: URI
title: View Snapshot
uri: >-
{{base_url}}/api/frigate/notifications/{{id}}/snapshot.jpg
- action: silence-{{ camera }}
title: Silence Notifications
destructive: true
until: "{{ wait.trigger.payload_json['type'] == 'end' }}"
- wait_for_trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: silence-{{ camera }}
timeout:
seconds: 30
continue_on_timeout: false
- delay:
minutes: 30
@@ -0,0 +1,159 @@
id: "automation_frigate_person_from_street"
alias: Frigate Person From Street
description: "Fire a notification if a person is detected by Frigate coming towards the house from the street"
mode: single
max_exceeded: silent
trigger:
platform: mqtt
topic: frigate/events
payload: new
value_template: "{{ value_json.type }}"
variables:
id: "{{ trigger.payload_json['after']['id'] }}"
camera: "{{ trigger.payload_json['after']['camera'] }}"
camera_name: "{{ camera | replace('_', ' ') | title }}"
object: "{{ trigger.payload_json['after']['label'] }}"
label: "{{ object | title }}"
entered_zones: "{{ trigger.payload_json['after']['entered_zones'] }}"
type: "{{ trigger.payload_json['type'] }}"
stationary: "{{ trigger.payload_json['after']['stationary'] }}"
base_url: https://automation.clintweaver.com
group_target: ""
zone_only: true
before_zones:
- from_street
after_zones:
- driveway_center
- driveway_east_side
- parking_spot
input_zones:
- from_street
zones: "{{ input_zones | list }}"
input_labels:
- person
labels: "{{ input_labels | list }}"
presence_entity: person.clint
condition:
- "{{ type != 'end' }}"
- "{{ not zone_only or entered_zones|length > 0 }}"
- "{{ not stationary }}"
- "{{ not zones|length or zones|select('in', entered_zones)|list|length > 0 }}"
- "{{ not labels|length or object in labels }}"
#- "{{ not presence_entity or not is_state(presence_entity, 'home') }}"
#- "{{ not garage_door or not is_state(garage_door, 'on') }}"
action:
- choose:
- conditions: "{{ not group_target }}"
sequence:
- device_id: 70c62eb366d6ed914b0ccc6bf41c32fd
domain: mobile_app
type: notify
message: A {{ label }} was detected on the {{ camera_name }} camera.
data:
tag: "{{ id }}"
group: frigate-notification-{{ camera }}
image: /api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
attachment:
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
- service: persistent_notification.create
data:
title: A {{ label }} was detected on the {{ camera_name }} camera.
message: 'A {{ label }} was detected on the {{ camera_name }} camera. ![image](https://automation.clintweaver.com/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/thumbnail.jpg)'
notification_id: "{{ id }}"
default:
- service: notify.{{ group_target }}
data:
message: A {{ label }} was detected on the {{ camera_name }} camera.
data:
tag: "{{ id }}"
group: frigate-notification-{{ camera }}
image: /api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
attachment:
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
- repeat:
sequence:
- wait_for_trigger:
- platform: mqtt
topic: frigate/events
payload: "{{ id }}"
value_template: "{{ value_json['after']['id'] }}"
timeout:
minutes: 2
continue_on_timeout: false
- condition: template
value_template: "{{ wait.trigger.payload_json['type'] == 'end' }}"
- choose:
- conditions: "{{ not group_target }}"
sequence:
- device_id: 70c62eb366d6ed914b0ccc6bf41c32fd
domain: mobile_app
type: notify
message: A {{ label }} was detected on the {{ camera_name }} camera.
data:
tag: "{{ id }}"
group: frigate-notification-{{ camera }}
url: >-
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
clickAction: >-
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
image: >-
/api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
sound: none
attachment:
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
actions:
- action: URI
title: View Clip
uri: >-
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
- action: URI
title: View Snapshot
uri: >-
{{base_url}}/api/frigate/notifications/{{id}}/snapshot.jpg
- action: silence-{{ camera }}
title: Silence Notifications
destructive: true
default:
- service: notify.{{ group_target }}
data:
message: A {{ label }} was detected on the {{ camera_name }} camera.
data:
tag: "{{ id }}"
group: frigate-notification-{{ camera }}
url: >-
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
clickAction: >-
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
image: >-
/api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
sound: none
attachment:
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
actions:
- action: URI
title: View Clip
uri: >-
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
- action: URI
title: View Snapshot
uri: >-
{{base_url}}/api/frigate/notifications/{{id}}/snapshot.jpg
- action: silence-{{ camera }}
title: Silence Notifications
destructive: true
until: "{{ wait.trigger.payload_json['type'] == 'end' }}"
- wait_for_trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: silence-{{ camera }}
timeout:
seconds: 30
continue_on_timeout: false
- delay:
minutes: 30
@@ -0,0 +1,154 @@
id: "1642041485222"
alias: Frigate Person Front Porch
description: "Fire a notification if a person is detected by Frigate in the front yard"
mode: single
max_exceeded: silent
trigger:
platform: mqtt
topic: frigate/events
payload: frigate_cam19
value_template: "{{ value_json['after']['camera'] }}"
variables:
id: "{{ trigger.payload_json['after']['id'] }}"
camera: "{{ trigger.payload_json['after']['camera'] }}"
camera_name: "{{ camera | replace('_', ' ') | title }}"
object: "{{ trigger.payload_json['after']['label'] }}"
label: "{{ object | title }}"
entered_zones: "{{ trigger.payload_json['after']['entered_zones'] }}"
type: "{{ trigger.payload_json['type'] }}"
base_url: https://automation.clintweaver.com
group_target: ""
zone_only: true
input_zones:
- front_porch
- driveway
zones: "{{ input_zones | list }}"
input_labels:
- person
labels: "{{ input_labels | list }}"
presence_entity: person.clint
condition:
- "{{ type != 'end' }}"
- "{{ not zone_only or entered_zones|length > 0 }}"
- "{{ not zones|length or zones|select('in', entered_zones)|list|length > 0 }}"
- "{{ not labels|length or object in labels }}"
#- "{{ not presence_entity or not is_state(presence_entity, 'home') }}"
- '{{ is_state("binary_sensor.garage_door","off") }}'
- '{{ is_state("binary_sensor.outer_garage_door","off") }}'
- '{{ is_state("binary_sensor.front_door_contact","off") }}'
- '{{ is_state("binary_sensor.patio_door_contact","off") }}'
- '{{ is_state("binary_sensor.front_porch_motion","off") }}'
- '{{ is_state("binary_sensor.garage_motion_switch_home_security_motion_detection","off") }}'
action:
- choose:
- conditions: "{{ not group_target }}"
sequence:
- device_id: 70c62eb366d6ed914b0ccc6bf41c32fd
domain: mobile_app
type: notify
message: A {{ label }} was detected on the {{ camera_name }} camera.
data:
tag: "{{ id }}"
group: frigate-notification-{{ camera }}
image: /api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
attachment:
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
- service: persistent_notification.create
data:
title: A {{ label }} was detected on the {{ camera_name }} camera.
message: 'A {{ label }} was detected on the {{ camera_name }} camera. ![image](https://automation.clintweaver.com/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/thumbnail.jpg)'
notification_id: "{{ id }}"
default:
- service: notify.{{ group_target }}
data:
message: A {{ label }} was detected on the {{ camera_name }} camera.
data:
tag: "{{ id }}"
group: frigate-notification-{{ camera }}
image: /api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
attachment:
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
- repeat:
sequence:
- wait_for_trigger:
- platform: mqtt
topic: frigate/events
payload: "{{ id }}"
value_template: "{{ value_json['after']['id'] }}"
timeout:
minutes: 2
continue_on_timeout: false
- condition: template
value_template: "{{ wait.trigger.payload_json['type'] == 'end' }}"
- choose:
- conditions: "{{ not group_target }}"
sequence:
- device_id: 70c62eb366d6ed914b0ccc6bf41c32fd
domain: mobile_app
type: notify
message: A {{ label }} was detected on the {{ camera_name }} camera.
data:
tag: "{{ id }}"
group: frigate-notification-{{ camera }}
url: >-
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
clickAction: >-
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
image: >-
/api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
sound: none
attachment:
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
actions:
- action: URI
title: View Clip
uri: >-
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
- action: URI
title: View Snapshot
uri: >-
{{base_url}}/api/frigate/notifications/{{id}}/snapshot.jpg
- action: silence-{{ camera }}
title: Silence Notifications
destructive: true
default:
- service: notify.{{ group_target }}
data:
message: A {{ label }} was detected on the {{ camera_name }} camera.
data:
tag: "{{ id }}"
group: frigate-notification-{{ camera }}
url: >-
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
clickAction: >-
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
image: >-
/api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
sound: none
attachment:
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
actions:
- action: URI
title: View Clip
uri: >-
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
- action: URI
title: View Snapshot
uri: >-
{{base_url}}/api/frigate/notifications/{{id}}/snapshot.jpg
- action: silence-{{ camera }}
title: Silence Notifications
destructive: true
until: "{{ wait.trigger.payload_json['type'] == 'end' }}"
- wait_for_trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: silence-{{ camera }}
timeout:
seconds: 30
continue_on_timeout: false
- delay:
minutes: 30
@@ -0,0 +1,162 @@
alias: Frigate Vehicle Notification
id: automation_frigate_vehicle_notification
description: "Fire a notification if a vehicle is detected by Frigate entering the driveway"
mode: single
max_exceeded: silent
trigger:
platform: mqtt
topic: frigate/events
payload: new
value_template: "{{ value_json.type }}"
variables:
id: "{{ trigger.payload_json['after']['id'] }}"
camera: "{{ trigger.payload_json['after']['camera'] }}"
camera_name: "{{ camera | replace('_', ' ') | title }}"
object: "{{ trigger.payload_json['after']['label'] }}"
label: "{{ object | title }}"
entered_zones: "{{ trigger.payload_json['after']['entered_zones'] }}"
type: "{{ trigger.payload_json['type'] }}"
stationary: "{{ trigger.payload_json['after']['stationary'] }}"
base_url: https://automation.clintweaver.com
group_target: "mobile_app_ticwatch_pro_3_gps"
zone_only: true
before_zones:
- from_street
after_zones:
- driveway_center
- driveway_east_side
- parking_spot
input_zones:
- from_street
zones: "{{ input_zones | list }}"
input_labels:
- vehicle
labels: "{{ input_labels | list }}"
presence_entity: "device_tracker.chevrolet_mylink"
boolean_entity: input_boolean
garage_door: binary_sensor.garage_door
primary_vehicle: device_tracker.chevrolet_mylink
condition:
- "{{ type != 'end' }}"
- "{{ not zone_only or entered_zones|length > 0 }}"
- "{{ not stationary }}"
- "{{ not zones|length or zones|select('in', entered_zones)|list|length > 0 }}"
- "{{ not labels|length or object in labels }}"
#- "{{ not presence_entity or not is_state(presence_entity, 'home') }}"
#- "{{ not garage_door or not is_state(garage_door, 'on') }}"
action:
- choose:
- conditions: "{{ not group_target }}"
sequence:
- device_id: 70c62eb366d6ed914b0ccc6bf41c32fd
domain: mobile_app
type: notify
message: A {{ label }} was detected on the {{ camera_name }} camera.
data:
tag: "{{ id }}"
group: frigate-notification-{{ camera }}
image: /api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
attachment:
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
- service: persistent_notification.create
data:
title: A {{ label }} was detected on the {{ camera_name }} camera.
message: 'A {{ label }} was detected on the {{ camera_name }} camera. ![image](https://automation.clintweaver.com/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/thumbnail.jpg)'
notification_id: "{{ id }}"
default:
- service: notify.{{ group_target }}
data:
message: A {{ label }} was detected on the {{ camera_name }} camera.
data:
tag: "{{ id }}"
group: frigate-notification-{{ camera }}
image: /api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
attachment:
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
- repeat:
sequence:
- wait_for_trigger:
- platform: mqtt
topic: frigate/events
payload: "{{ id }}"
value_template: "{{ value_json['after']['id'] }}"
timeout:
minutes: 2
continue_on_timeout: false
- condition: template
value_template: "{{ wait.trigger.payload_json['type'] == 'end' }}"
- choose:
- conditions: "{{ not group_target }}"
sequence:
- device_id: 70c62eb366d6ed914b0ccc6bf41c32fd
domain: mobile_app
type: notify
message: A {{ label }} was detected on the {{ camera_name }} camera.
data:
tag: "{{ id }}"
group: frigate-notification-{{ camera }}
url: >-
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
clickAction: >-
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
image: >-
/api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
sound: none
attachment:
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
actions:
- action: URI
title: View Clip
uri: >-
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
- action: URI
title: View Snapshot
uri: >-
{{base_url}}/api/frigate/notifications/{{id}}/snapshot.jpg
- action: silence-{{ camera }}
title: Silence Notifications
destructive: true
default:
- service: notify.{{ group_target }}
data:
message: A {{ label }} was detected on the {{ camera_name }} camera.
data:
tag: "{{ id }}"
group: frigate-notification-{{ camera }}
url: >-
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
clickAction: >-
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
image: >-
/api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
sound: none
attachment:
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
actions:
- action: URI
title: View Clip
uri: >-
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
- action: URI
title: View Snapshot
uri: >-
{{base_url}}/api/frigate/notifications/{{id}}/snapshot.jpg
- action: silence-{{ camera }}
title: Silence Notifications
destructive: true
until: "{{ wait.trigger.payload_json['type'] == 'end' }}"
- wait_for_trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: silence-{{ camera }}
timeout:
seconds: 30
continue_on_timeout: false
- delay:
minutes: 30
+42
View File
@@ -0,0 +1,42 @@
alias: 'All away media off'
id: automation_all_away_media_off
initial_state: 'on'
mode: single
max_exceeded: silent
trigger:
- platform: state
entity_id: input_boolean.home_occupied
to: 'off'
for: '00:05:00'
condition:
condition: or
conditions:
- condition: state
entity_id: media_player.kitchen
state: 'playing'
- condition: state
entity_id: media_player.great_room
state: 'playing'
- condition: state
entity_id: media_player.front_room_tv
state: 'playing'
- condition: state
entity_id: media_player.front_room_hub
state: 'playing'
- condition: state
entity_id: media_player.master_bedroom_clock
state: 'playing'
- condition: state
entity_id: media_player.nursery_hub
state: 'playing'
- condition: state
entity_id: media_player.bathroom_mini
state: 'playing'
- condition: state
entity_id: media_player.downstairs_roku
state: 'playing'
action:
service: media_player.turn_off
data:
entity_id: all
@@ -0,0 +1,28 @@
alias: 'Guest mode off nobody home'
id: automation_guest_mode_off_nobody_home
mode: single
max_exceeded: silent
trigger:
- platform: state
entity_id: input_boolean.guest_mode
to: 'off'
condition:
condition: and
conditions:
# We're all away
- condition: state
entity_id: input_boolean.clint_home
state: 'off'
- condition: state
entity_id: input_boolean.kristy_home
state: 'off'
- condition: or
conditions:
# Either the phone or tablet are away, or the family room isn't occupied
- condition: state
entity_id: input_boolean.clint_home
state: 'off'
action:
- service: input_boolean.turn_off
entity_id: input_boolean.home_occupied
+41
View File
@@ -0,0 +1,41 @@
alias: 'Home not occupied'
id: automation_home_not_occupied
mode: single
max_exceeded: silent
trigger:
- platform: state
entity_id:
- input_boolean.clint_home
- input_boolean.emmett_home
- input_boolean.bridget_home
- input_boolean.kristy_home
- input_boolean.marshall_home
- input_boolean.tess_home
- input_boolean.ebin_home
- input_boolean.guest_mode
to: 'off'
condition:
- condition: state
entity_id: input_boolean.home_occupied
state: 'on'
# We're all away
- condition: numeric_state
entity_id: group.person_household
below: 1
value_template: "{{ dict((states|selectattr('entity_id', 'in', state_attr('group.person_household', 'entity_id'))|list)|groupby('state'))['on']|count }}"
action:
- service: input_boolean.turn_off
entity_id: input_boolean.home_occupied
- service: automation.turn_on
data:
entity_id: automation.garage_open_nobody_home
- choose:
- conditions:
- condition: state
entity_id: binary_sensor.patio_door_contact
state: 'off'
sequence:
- service: lock.lock
target:
entity_id: lock.patio_door
+36
View File
@@ -0,0 +1,36 @@
alias: 'Home occupied'
id: automation_home_occupied
mode: single
max_exceeded: silent
trigger:
- platform: state
entity_id:
- input_boolean.clint_home
- input_boolean.emmett_home
- input_boolean.bridget_home
- input_boolean.kristy_home
- input_boolean.marshall_home
- input_boolean.tess_home
- input_boolean.ebin_home
- input_boolean.guest_mode
to: 'on'
- platform: state
entity_id: cover.garage_door
from: 'off'
to: 'on'
condition:
- condition: state
entity_id: input_boolean.home_occupied
state: 'off'
# One person is home
- condition: numeric_state
entity_id: group.person_household
above: 0
value_template: "{{ dict((states|selectattr('entity_id', 'in', state_attr('group.person_household', 'entity_id'))|list)|groupby('state'))['on']|count }}"
action:
- service: input_boolean.turn_on
entity_id: input_boolean.home_occupied
- service: automation.turn_off
data:
entity_id: automation.garage_open_nobody_home
+104
View File
@@ -0,0 +1,104 @@
alias: House Mode Change
id: automation_house_mode_change
mode: queued
# Detect when something changes and/or when Home Assistant Starts
trigger:
- platform: state
entity_id:
- input_boolean.home_occupied
- input_boolean.bedtime
- sensor.people_count
- platform: homeassistant
event: start
action:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.home_occupied
state: 'off'
sequence:
- service: input_select.select_option
data:
entity_id: input_select.house
option: 'Away'
- conditions:
- condition: state
entity_id: input_boolean.home_occupied
state: 'on'
- condition: state
entity_id: sensor.people_count
state: '1'
sequence:
- service: input_select.select_option
data:
entity_id: input_select.house
option: 'Bachelor'
- service: homeassistant.turn_on
entity_id:
- input_boolean.lighting_automations
- input_boolean.brightness_automations
- conditions:
- condition: state
entity_id: input_boolean.home_occupied
state: 'on'
- condition: numeric_state
entity_id: sensor.people_count
above: 1
below: 4
- condition: or
conditions:
- condition: state
entity_id: input_boolean.emmett_home
state: 'on'
- condition: state
entity_id: input_boolean.bridget_home
state: 'on'
sequence:
- service: input_select.select_option
data:
entity_id: input_select.house
option: 'Dad'
- service: homeassistant.turn_on
entity_id:
- input_boolean.lighting_automations
- input_boolean.brightness_automations
- conditions:
- condition: state
entity_id: input_select.house
state: 'Guest'
sequence:
- service: homeassistant.turn_off
entity_id:
- input_boolean.lighting_automations
- conditions:
- condition: state
entity_id: input_select.house
state: 'Manual'
sequence:
- service: homeassistant.turn_off
entity_id:
- input_boolean.lighting_automations
- input_boolean.brightness_automations
default:
- service: input_select.select_option
data:
entity_id: input_select.house
option: 'Auto'
- service: homeassistant.turn_on
entity_id:
- input_boolean.lighting_automations
- input_boolean.brightness_automations
+16
View File
@@ -0,0 +1,16 @@
alias: "Leaving Home"
id: automation_leaving_home
mode: single
max_exceeded: silent
trigger:
- platform: state
entity_id: input_boolean.home_occupied
to: "off"
for: "00:05:00"
action:
- service: homeassistant.turn_off
entity_id:
- group.my_lights
- group.my_fans
- group.my_room_status
@@ -0,0 +1,219 @@
alias: 'Update Automatic Light Profile'
id: automation_update_automatic_light_profile
trigger:
- platform: state
entity_id:
- input_select.time_of_day
- input_select.early_morning_mode
- input_select.morning_mode
- input_select.late_morning_mode
- input_select.early_afternoon_mode
- input_select.late_afternoon_mode
- input_select.early_evening_mode
- input_select.evening_mode
- input_select.late_evening_mode
- input_select.night_mode
- input_select.early_morning_kids_mode
- input_select.morning_kids_mode
- input_select.late_morning_kids_mode
- input_select.early_afternoon_kids_mode
- input_select.late_afternoon_kids_mode
- input_select.early_evening_kids_mode
- input_select.evening_kids_mode
- input_select.late_evening_kids_mode
- input_select.night_kids_mode
action:
- choose:
- conditions:
- condition: state
entity_id: binary_sensor.have_custody
state: 'off'
sequence:
- choose:
# Set to Energize during Early Morning (04:00 - 06:00)
- conditions:
- condition: state
entity_id: input_select.time_of_day
state: 'Early Morning'
sequence:
- service: input_select.select_option
data:
entity_id: input_select.automatic_light_profile
option: "{{states('input_select.early_morning_mode')}}"
# Set to Energize during Morning (06:00 - 09:00)
- conditions:
- condition: state
entity_id: input_select.time_of_day
state: 'Morning'
sequence:
- service: input_select.select_option
data:
entity_id: input_select.automatic_light_profile
option: "{{states('input_select.morning_mode')}}"
# Set to Energize during Late Morning (09:00 - 12:00)
- conditions:
- condition: state
entity_id: input_select.time_of_day
state: 'Late Morning'
sequence:
- service: input_select.select_option
data:
entity_id: input_select.automatic_light_profile
option: "{{states('input_select.late_morning_mode')}}"
# Set to Concentrate during Early Afternoon (12:00 - 15:00)
- conditions:
- condition: state
entity_id: input_select.time_of_day
state: 'Early Afternoon'
sequence:
- service: input_select.select_option
data:
entity_id: input_select.automatic_light_profile
option: "{{states('input_select.early_afternoon_mode')}}"
# Set to Concentrate during Late Afternoon (15:00 - 17:00)
- conditions:
- condition: state
entity_id: input_select.time_of_day
state: 'Late Afternoon'
sequence:
- service: input_select.select_option
data:
entity_id: input_select.automatic_light_profile
option: "{{states('input_select.late_afternoon_mode')}}"
# Set to Read during Early Evening (17:00 - 19:00)
- conditions:
- condition: state
entity_id: input_select.time_of_day
state: 'Early Evening'
sequence:
- service: input_select.select_option
data:
entity_id: input_select.automatic_light_profile
option: "{{states('input_select.early_evening_mode')}}"
# Set to Relax during Evening (19:00 - 22:00)
- conditions:
- condition: state
entity_id: input_select.time_of_day
state: 'Evening'
sequence:
- service: input_select.select_option
data:
entity_id: input_select.automatic_light_profile
option: "{{states('input_select.evening_mode')}}"
# Set to Dimmed during Late Evening (22:00 - 00:00)
- conditions:
- condition: state
entity_id: input_select.time_of_day
state: 'Late Evening'
sequence:
- service: input_select.select_option
data:
entity_id: input_select.automatic_light_profile
option: "{{states('input_select.late_evening_mode')}}"
# Set to Nightlight during Night (00:00 - 04:00)
- conditions:
- condition: state
entity_id: input_select.time_of_day
state: 'Night'
sequence:
- service: input_select.select_option
data:
entity_id: input_select.automatic_light_profile
option: "{{states('input_select.night_mode')}}"
- conditions:
- condition: state
entity_id: binary_sensor.have_custody
state: 'on'
sequence:
- choose:
# Set to Energize during Early Morning (04:00 - 06:00)
- conditions:
- condition: state
entity_id: input_select.time_of_day
state: 'Early Morning'
sequence:
- service: input_select.select_option
data:
entity_id: input_select.automatic_light_profile
option: "{{states('input_select.early_morning_kids_mode')}}"
# Set to Energize during Morning (06:00 - 09:00)
- conditions:
- condition: state
entity_id: input_select.time_of_day
state: 'Morning'
sequence:
- service: input_select.select_option
data:
entity_id: input_select.automatic_light_profile
option: "{{states('input_select.morning_kids_mode')}}"
# Set to Energize during Late Morning (09:00 - 12:00)
- conditions:
- condition: state
entity_id: input_select.time_of_day
state: 'Late Morning'
sequence:
- service: input_select.select_option
data:
entity_id: input_select.automatic_light_profile
option: "{{states('input_select.late_morning_kids_mode')}}"
# Set to Concentrate during Early Afternoon (12:00 - 15:00)
- conditions:
- condition: state
entity_id: input_select.time_of_day
state: 'Early Afternoon'
sequence:
- service: input_select.select_option
data:
entity_id: input_select.automatic_light_profile
option: "{{states('input_select.early_afternoon_kids_mode')}}"
# Set to Concentrate during Late Afternoon (15:00 - 17:00)
- conditions:
- condition: state
entity_id: input_select.time_of_day
state: 'Late Afternoon'
sequence:
- service: input_select.select_option
data:
entity_id: input_select.automatic_light_profile
option: "{{states('input_select.late_afternoon_kids_mode')}}"
# Set to Read during Early Evening (17:00 - 19:00)
- conditions:
- condition: state
entity_id: input_select.time_of_day
state: 'Early Evening'
sequence:
- service: input_select.select_option
data:
entity_id: input_select.automatic_light_profile
option: "{{states('input_select.early_evening_kids_mode')}}"
# Set to Relax during Evening (19:00 - 22:00)
- conditions:
- condition: state
entity_id: input_select.time_of_day
state: 'Evening'
sequence:
- service: input_select.select_option
data:
entity_id: input_select.automatic_light_profile
option: "{{states('input_select.evening_kids_mode')}}"
# Set to Dimmed during Late Evening (22:00 - 00:00)
- conditions:
- condition: state
entity_id: input_select.time_of_day
state: 'Late Evening'
sequence:
- service: input_select.select_option
data:
entity_id: input_select.automatic_light_profile
option: "{{states('input_select.late_evening_kids_mode')}}"
# Set to Nightlight during Night (00:00 - 04:00)
- conditions:
- condition: state
entity_id: input_select.time_of_day
state: 'Night'
sequence:
- service: input_select.select_option
data:
entity_id: input_select.automatic_light_profile
option: "{{states('input_select.night_kids_mode')}}"
@@ -0,0 +1,268 @@
alias: Update Light Off Delay
id: automation_update_light_off_delay
mode: queued
# Detect when something changes and/or when Home Assistant Starts
trigger:
- platform: state
entity_id: input_select.house
- platform: homeassistant
event: start
action:
- choose:
- alias: "House set to Away"
conditions:
- condition: state
entity_id: input_select.house
state: 'Away'
sequence:
- service: input_number.set_value
target:
entity_id: input_number.short_light_off_delay_seconds
data:
value: 30
- service: input_number.set_value
target:
entity_id: input_number.short_light_off_delay_minutes
data:
value: 0
- service: input_number.set_value
target:
entity_id: input_number.short_light_off_delay_hours
data:
value: 0
- service: input_number.set_value
target:
entity_id: input_number.normal_light_off_delay_seconds
data:
value: 0
- service: input_number.set_value
target:
entity_id: input_number.normal_light_off_delay_minutes
data:
value: 5
- service: input_number.set_value
target:
entity_id: input_number.normal_light_off_delay_hours
data:
value: 0
- service: input_number.set_value
target:
entity_id: input_number.long_light_off_delay_seconds
data:
value: 0
- service: input_number.set_value
target:
entity_id: input_number.long_light_off_delay_minutes
data:
value: 30
- service: input_number.set_value
target:
entity_id: input_number.long_light_off_delay_hours
data:
value: 0
- alias: "House set to Bachelor - 10 minutes"
conditions:
- condition: state
entity_id: input_select.house
state: 'Bachelor'
sequence:
- service: input_number.set_value
target:
entity_id: input_number.short_light_off_delay_seconds
data:
value: 0
- service: input_number.set_value
target:
entity_id: input_number.short_light_off_delay_minutes
data:
value: 1
- service: input_number.set_value
target:
entity_id: input_number.short_light_off_delay_hours
data:
value: 0
- service: input_number.set_value
target:
entity_id: input_number.normal_light_off_delay_seconds
data:
value: 0
- service: input_number.set_value
target:
entity_id: input_number.normal_light_off_delay_minutes
data:
value: 10
- service: input_number.set_value
target:
entity_id: input_number.normal_light_off_delay_hours
data:
value: 0
- service: input_number.set_value
target:
entity_id: input_number.long_light_off_delay_seconds
data:
value: 0
- service: input_number.set_value
target:
entity_id: input_number.long_light_off_delay_minutes
data:
value: 0
- service: input_number.set_value
target:
entity_id: input_number.long_light_off_delay_hours
data:
value: 1
- alias: "House set to Guest - 30 minutes"
conditions:
- condition: state
entity_id: input_select.house
state: 'Manual'
sequence:
- service: input_number.set_value
target:
entity_id: input_number.short_light_off_delay_seconds
data:
value: 0
- service: input_number.set_value
target:
entity_id: input_number.short_light_off_delay_minutes
data:
value: 10
- service: input_number.set_value
target:
entity_id: input_number.short_light_off_delay_hours
data:
value: 0
- service: input_number.set_value
target:
entity_id: input_number.normal_light_off_delay_seconds
data:
value: 0
- service: input_number.set_value
target:
entity_id: input_number.normal_light_off_delay_minutes
data:
value: 30
- service: input_number.set_value
target:
entity_id: input_number.normal_light_off_delay_hours
data:
value: 0
- service: input_number.set_value
target:
entity_id: input_number.long_light_off_delay_seconds
data:
value: 0
- service: input_number.set_value
target:
entity_id: input_number.long_light_off_delay_minutes
data:
value: 0
- service: input_number.set_value
target:
entity_id: input_number.long_light_off_delay_hours
data:
value: 1
- alias: "House set to Manual - 60 minutes"
conditions:
- condition: state
entity_id: input_select.house
state: 'Manual'
sequence:
- service: input_number.set_value
target:
entity_id: input_number.short_light_off_delay_seconds
data:
value: 0
- service: input_number.set_value
target:
entity_id: input_number.short_light_off_delay_minutes
data:
value: 20
- service: input_number.set_value
target:
entity_id: input_number.short_light_off_delay_hours
data:
value: 0
- service: input_number.set_value
target:
entity_id: input_number.normal_light_off_delay_seconds
data:
value: 0
- service: input_number.set_value
target:
entity_id: input_number.normal_light_off_delay_minutes
data:
value: 0
- service: input_number.set_value
target:
entity_id: input_number.normal_light_off_delay_hours
data:
value: 1
- service: input_number.set_value
target:
entity_id: input_number.long_light_off_delay_seconds
data:
value: 0
- service: input_number.set_value
target:
entity_id: input_number.long_light_off_delay_minutes
data:
value: 0
- service: input_number.set_value
target:
entity_id: input_number.long_light_off_delay_hours
data:
value: 2
default:
- service: input_number.set_value
target:
entity_id: input_number.short_light_off_delay_seconds
data:
value: 0
- service: input_number.set_value
target:
entity_id: input_number.short_light_off_delay_minutes
data:
value: 10
- service: input_number.set_value
target:
entity_id: input_number.short_light_off_delay_hours
data:
value: 0
- service: input_number.set_value
target:
entity_id: input_number.normal_light_off_delay_seconds
data:
value: 0
- service: input_number.set_value
target:
entity_id: input_number.normal_light_off_delay_minutes
data:
value: 30
- service: input_number.set_value
target:
entity_id: input_number.normal_light_off_delay_hours
data:
value: 0
- service: input_number.set_value
target:
entity_id: input_number.long_light_off_delay_seconds
data:
value: 0
- service: input_number.set_value
target:
entity_id: input_number.long_light_off_delay_minutes
data:
value: 0
- service: input_number.set_value
target:
entity_id: input_number.long_light_off_delay_hours
data:
value: 1
@@ -0,0 +1,28 @@
alias: Bridget Asleep
id: automation_bridget_asleep
mode: restart
trigger:
- platform: state
id: in_bed
entity_id: input_boolean.bridget_in_bed
to: 'on'
for: '00:20:00'
- platform: homeassistant
event: start
condition:
- condition: state
entity_id:
- input_boolean.bridget_home
- input_boolean.kids_bedtime
state: 'on'
- condition: state
entity_id: input_boolean.bridget_is_awake
state: 'on'
- condition: trigger
id: "in_bed"
action:
- service: homeassistant.turn_off
entity_id: input_boolean.bridget_is_awake
@@ -0,0 +1,21 @@
alias: "Bridget Away"
id: automation_bridget_away
mode: restart
trigger:
- platform: state
entity_id:
- binary_sensor.bridget_home
to: "off"
- platform: time_pattern
minutes: "/5"
condition:
- condition: state
entity_id: input_boolean.bridget_home
state: "on"
- condition: state
entity_id: binary_sensor.bridget_home
state: "off"
action:
- service: input_boolean.turn_off
entity_id: input_boolean.bridget_home
@@ -0,0 +1,23 @@
alias: "Bridget Home"
id: automation_bridget_home
mode: restart
trigger:
- platform: state
entity_id:
- binary_sensor.bridget_home
to: "on"
- platform: time_pattern
minutes: "/5"
condition:
- condition: state
entity_id: input_boolean.bridget_home
state: "off"
- condition: state
entity_id: binary_sensor.bridget_home
state: "on"
action:
- service: input_boolean.turn_off
entity_id: input_boolean.bridget_travelling
- service: input_boolean.turn_on
entity_id: input_boolean.bridget_home
@@ -0,0 +1,38 @@
alias: Bridget In Bed
id: automation_bridget_in_bed
mode: restart
trigger:
- platform: state
entity_id: binary_sensor.white_bed_occupied
to: 'on'
for: '00:10:00'
- platform: state
entity_id: input_boolean.kids_bedtime
to: 'on'
- platform: homeassistant
event: start
condition:
- condition: state
entity_id:
- input_boolean.bridget_home
- input_boolean.kids_bedtime
state: 'on'
- condition: state
entity_id:
- binary_sensor.white_bed_occupied
state: 'on'
for: '00:10:00'
- condition: state
entity_id: input_boolean.bridget_in_bed
state: 'off'
#- condition: state
# entity_id: binary_sensor.white_bed_occupied
# state: 'on'
# for:
# minutes: 5
action:
- service: homeassistant.turn_on
entity_id: input_boolean.bridget_in_bed
@@ -0,0 +1,26 @@
initial_state: "on"
alias: "Bridget Location Update"
id: automation_bridget_location_update
mode: restart
trigger:
# Bridget moved
- platform: state
entity_id:
- input_select.bridget_status_dropdown
- input_boolean.bridget_home
# Clint moved
- input_select.clint_status_dropdown
- input_boolean.clint_home
# Custody changed
- binary_sensor.have_custody
# Sleeping status changed
- input_boolean.bridget_is_awake
- input_boolean.bridget_in_bed
condition:
- condition: template
value_template: "{{ trigger.from_state.state != trigger.to_state.state }}"
action:
- service: script.turn_on
entity_id: script.bridget_travel_sensor
@@ -0,0 +1,47 @@
alias: Bridget Status at Startup
id: automation_bridget_status_at_startup
mode: restart
trigger:
- platform: homeassistant
event: start
condition:
- condition: state
entity_id: input_boolean.bridget_home
state: 'on'
action:
- choose:
- conditions:
- condition: time
after: '20:00:00'
before: '21:00:00'
sequence:
- service: input_boolean.turn_on
entity_id:
- input_boolean.bridget_in_bed
- service: input_boolean.turn_on
entity_id:
- input_boolean.bridget_is_awake
- conditions:
- condition: time
after: '21:00:00'
before: '06:00:00'
sequence:
- service: input_boolean.turn_on
entity_id:
- input_boolean.bridget_in_bed
- service: input_boolean.turn_off
entity_id:
- input_boolean.bridget_is_awake
default:
- service: input_boolean.turn_off
entity_id:
- input_boolean.bridget_in_bed
- service: input_boolean.turn_on
entity_id:
- input_boolean.bridget_is_awake
+26
View File
@@ -0,0 +1,26 @@
alias: Clint WFH
id: automation_clint_wfh
mode: restart
trigger:
- platform: state
entity_id: binary_sensor.clint_work_from_home
- platform: homeassistant
event: start
action:
- choose:
- conditions:
- condition: state
entity_id: binary_sensor.clint_work_from_home
state: 'on'
sequence:
- service: homeassistant.turn_on
entity_id: input_boolean.clint_work_from_home
- conditions:
- condition: state
entity_id: binary_sensor.clint_work_from_home
state: 'off'
sequence:
- service: homeassistant.turn_off
entity_id: input_boolean.clint_work_from_home
@@ -0,0 +1,26 @@
alias: Clint Asleep
id: automation_clint_asleep
initial_state: 'on'
trigger:
- platform: state
entity_id: input_boolean.clint_in_bed
to: 'on'
for:
minutes: 15
condition:
- condition: and
conditions:
- condition: state
entity_id: input_boolean.clint_is_awake
state: 'on'
- condition: state
entity_id: input_boolean.clint_home
state: 'on'
- condition: time
after: '21:00:00'
before: '04:00:00'
action:
- service: input_boolean.turn_off
entity_id: input_boolean.clint_is_awake
@@ -0,0 +1,13 @@
alias: Clint at Work
id: automation_clint_at_work
trigger:
platform: state
entity_id: device_tracker.pixel_7
to: 'AGH'
action:
- service: automation.turn_on
entity_id: automation.clint_home_after_work
- service: input_text.set_value
data:
entity_id: input_text.person_clint
value: at work
+15
View File
@@ -0,0 +1,15 @@
alias: Clint Awake
id: automation_clint_awake
mode: restart
trigger:
- platform: state
entity_id: input_boolean.clint_in_bed
to: 'off'
for: '00:00:30'
action:
- service: input_boolean.turn_on
entity_id: input_boolean.clint_is_awake
- service: script.turn_on
entity_id: script.clint_travel_sensor
+39
View File
@@ -0,0 +1,39 @@
alias: Clint Away
id: automation_clint_away
mode: restart
trigger:
- platform: state
entity_id:
- device_tracker.pixel_7
- person.clint
- group.person_clint
from: 'home'
- platform: homeassistant
event: start
condition:
- condition: not
conditions:
- condition: state
entity_id: person.clint
state: 'home'
- condition: state
entity_id: device_tracker.pixel_7
state: 'home'
action:
- choose:
- conditions:
- condition: not
conditions:
- condition: state
entity_id: person.clint
state: 'home'
sequence:
- service: input_boolean.turn_off
entity_id: input_boolean.clint_home
- delay: '00:00:30'
+58
View File
@@ -0,0 +1,58 @@
alias: Clint Home
id: automation_clint_home
mode: restart
trigger:
- platform: state
entity_id:
- device_tracker.pixel_7
- person.clint
- group.person_clint
- device_tracker.pixel_7_wifi
to: 'home'
- platform: state
id: car_home
entity_id:
- binary_sensor.gray_suv_east_side
- binary_sensor.gray_suv_west_side
from: 'off'
to: 'on'
- platform: homeassistant
event: start
action:
- choose:
- conditions:
- condition: or
conditions:
- condition: numeric_state
entity_id: group.person_clint
above: 0
value_template: "{{ dict((states|selectattr('entity_id', 'in', state_attr('group.person_clint', 'entity_id'))|list)|groupby('state'))['home']|count }}"
- condition: state
entity_id: sensor.pixel_7_wifi_connection
state: 'DreamWeaver'
- condition: state
entity_id: sensor.pixel_7_wifi_connection
state: 'DreamIoT-2G'
- condition: state
entity_id: sensor.pixel_7_wifi_connection
state: 'pozfam'
- condition: state
entity_id: sensor.pixel_7_wifi_connection
state: 'pozfam-2.4G'
- condition: trigger
id: "car_home"
sequence:
- service: input_boolean.turn_off
entity_id: input_boolean.clint_travelling
- service: input_boolean.turn_on
entity_id: input_boolean.clint_home
- service: automation.turn_on
entity_id: automation.clint_at_work
- delay: '00:00:30'
@@ -0,0 +1,28 @@
initial_state: 'off'
alias: 'clint home after work'
id: automation_home_after_work
trigger:
platform: state
entity_id: device_tracker.pixel_7
to: 'home'
for:
minutes: 10
condition:
condition: and
conditions:
- condition: state
entity_id: input_boolean.notify_clint_work
state: 'on'
- condition: or
conditions:
- condition: time
after: '15:00:00'
weekday:
- mon
- tue
- wed
- thu
- fri
action:
- service: homeassistant.turn_off
entity_id: automation.clint_home_after_work
@@ -0,0 +1,70 @@
alias: Clint in Bed
id: automation_clint_in_bed
trigger:
# Bed in master bedroom is occupied
- platform: state
entity_id: binary_sensor.master_bed_occupied
to: 'on'
# Radio playing
- platform: state
entity_id: media_player.master_bedroom_clock
to: 'playing'
- platform: state
entity_id: media_player.master_bedroom_clock
to: 'idle'
# Light on
- platform: state
entity_id: light.master_bedroom_hue
to: 'on'
# Front room unoccupied for at least 5 minutes
- platform: state
entity_id: input_boolean.front_room_occupied
to: 'off'
for:
minutes: 5
# Something gets plugged in
- platform: state
entity_id: sensor.pixel_7_charger_type
to: "Wireless"
- platform: state
entity_id: sensor.pixel_7_charger_type
to: "wireless"
- platform: state
entity_id: input_boolean.clint_tablet_charging
to: 'on'
condition:
- alias: "An adult is home and not in bed"
condition: or
conditions:
- alias: "Clint is home and not in bed"
condition: and
conditions:
- condition: state
entity_id: input_boolean.clint_in_bed
state: 'off'
- condition: state
entity_id: input_boolean.clint_home
state: 'on'
- alias: "Kristy is home and not in bed"
condition: and
conditions:
- condition: state
entity_id: input_boolean.kristy_in_bed
state: 'off'
- condition: state
entity_id: input_boolean.kristy_home
state: 'on'
- alias: "Its between 8:30PM and 5AM"
condition: time
after: '20:30:00'
before: '05:00:00'
- alias: "The bed is occupied"
condition: state
entity_id: binary_sensor.master_bed_occupied
state: 'on'
action:
- service: input_boolean.turn_on
entity_id: input_boolean.clint_in_bed
@@ -0,0 +1,19 @@
initial_state: 'on'
alias: 'Clint Location Update'
id: automation_clint_location_update
mode: restart
trigger:
# I've moved
- platform: state
entity_id:
- input_select.clint_status_dropdown
- input_boolean.clint_home
condition:
- condition: template
value_template: '{{ trigger.from_state.state != trigger.to_state.state }}'
action:
- service: script.turn_on
entity_id: script.clint_travel_sensor
@@ -0,0 +1,15 @@
alias: Clint Travelling
id: automation_clint_travelling
initial_state: 'on'
trigger:
- platform: homeassistant
event: start
- platform: time
at: '21:00:00'
condition:
- condition: state
entity_id: input_boolean.clint_home
state: 'off'
action:
- service: input_boolean.turn_on
entity_id: input_boolean.clint_travelling
+44
View File
@@ -0,0 +1,44 @@
alias: 'Clint Up'
id: automation_clint_up
initial_state: 'on'
trigger:
- platform: state
entity_id: media_player.great_room
to: 'playing'
- platform: state
entity_id: media_player.great_room
to: 'idle'
- platform: state
entity_id: binary_sensor.master_bed_occupied
to: 'off'
for: '00:05:00'
- platform: state
entity_id:
- binary_sensor.master_bedroom_door_contact
- binary_sensor.master_suite_door_contact
to: 'on'
- platform: state
entity_id: binary_sensor.pixel_7_is_charging
from: 'on'
to: 'off'
for: '00:10:00'
condition:
- condition: and
conditions:
- condition: state
entity_id: input_boolean.clint_home
state: 'on'
- condition: state
entity_id: input_boolean.clint_in_bed
state: 'on'
- condition: time
after: '04:00:00'
before: '22:00:00'
- condition: state
entity_id: binary_sensor.master_bed_occupied
state: 'off'
for: '00:01:00'
action:
- service: input_boolean.turn_off
entity_id: input_boolean.clint_in_bed
@@ -0,0 +1,37 @@
alias: Clint Wakeup
id: automation_clint_wake_up
mode: restart
trigger:
- platform: state
entity_id: binary_sensor.morning
to: 'on'
- platform: state
entity_id: binary_sensor.master_bed_occupied
to: 'on'
condition:
- condition: state
entity_id: input_boolean.clint_home
state: 'on'
- condition: state
entity_id: binary_sensor.master_bed_occupied
state: 'on'
- condition: state
entity_id: binary_sensor.morning
state: 'on'
- condition: state
entity_id: binary_sensor.work_day
state: 'on'
action:
- service: input_select.select_option
data:
entity_id: input_select.master_bedroom_mode
option: 'Auto'
- service: homeassistant.turn_on
data:
entity_id: light.master_bedroom_hue
- delay: '00:30:00'
@@ -0,0 +1,19 @@
initial_state: 'on'
alias: 'Clint changing zones'
id: automation_clint_changing_zones
trigger:
# Been away for a few minutes
- platform: state
entity_id: device_tracker.pixel_7
to: 'not_home'
for: '00:05:00'
# Arrived in a zone
- platform: state
entity_id: device_tracker.pixel_7
from: 'not_home'
condition:
# Been at least 5 minutes
- condition: template
value_template: "{{ ( as_timestamp(now()) - as_timestamp(state_attr('script.clint_traveltime','last_triggered'))|float)|float > 300 }}"
action:
- service: script.clint_traveltime
@@ -0,0 +1,46 @@
alias: Clint Status at Startup
id: automation_clint_status_at_startup
mode: restart
trigger:
- platform: homeassistant
event: start
condition:
- condition: state
entity_id: input_boolean.clint_home
state: 'on'
action:
- choose:
- conditions:
- condition: time
after: '23:30:00'
before: '00:00:00'
sequence:
- service: input_boolean.turn_on
entity_id:
- input_boolean.clint_in_bed
- service: input_boolean.turn_on
entity_id:
- input_boolean.clint_is_awake
- conditions:
- condition: time
after: '00:00:00'
before: '06:00:00'
sequence:
- service: input_boolean.turn_on
entity_id:
- input_boolean.clint_in_bed
- service: input_boolean.turn_off
entity_id:
- input_boolean.clint_is_awake
default:
- service: input_boolean.turn_off
entity_id:
- input_boolean.clint_in_bed
- service: input_boolean.turn_on
entity_id:
- input_boolean.clint_is_awake
@@ -0,0 +1,41 @@
alias: Set Clint Next Alarm
id: automation_set_clint_next_alarm
trigger:
- platform: state
entity_id: binary_sensor.work_day
to: 'off'
- platform: state
entity_id: binary_sensor.work_day
to: 'on'
- platform: time
at: '01:00:00'
- platform: homeassistant
event: start
action:
- choose:
- conditions:
- condition: state
entity_id: binary_sensor.work_day
state: 'off'
sequence:
- service: input_datetime.set_datetime
target:
entity_id: input_datetime.clint_next_alarm
data:
time: "09:00:00"
- conditions:
- condition: state
entity_id: binary_sensor.work_day
state: 'on'
sequence:
- service: input_datetime.set_datetime
target:
entity_id: input_datetime.clint_next_alarm
data:
time: "06:00:00"
+40
View File
@@ -0,0 +1,40 @@
alias: 'Wake Clint'
id: automation_wake_clint
initial_state: on
trigger:
platform: time
at: input_datetime.clint_next_alarm
# condition:
# - condition: state
# entity_id: binary_sensor.work_day
# state: 'on'
action:
- service: input_boolean.turn_off
data:
entity_id: input_boolean.master_bedroom_asleep
- service: media_player.volume_set
data:
entity_id: media_player.master_bedroom_clock
volume_level: 0.95
- choose:
- conditions:
- condition: state
entity_id: input_select.master_bedroom_mode
state: 'off'
sequence:
- service: input_select.select_option
data:
option: Energize
target:
entity_id: input_select.master_bedroom_mode
- service: input_select.select_option
data:
option: Energize
target:
entity_id: input_select.master_bedroom_mode
- service: script.wake_up_the_master_bedroom
+18
View File
@@ -0,0 +1,18 @@
alias: 'Ebin Away'
id: automation_ebin_away
mode: restart
trigger:
- platform: state
entity_id:
- binary_sensor.ebin_home
to: "off"
- platform: time_pattern
minutes: "/5"
condition:
- condition: state
entity_id: input_boolean.ebin_home
state: 'on'
action:
- service: input_boolean.turn_off
entity_id: input_boolean.ebin_home
+25
View File
@@ -0,0 +1,25 @@
alias: 'Ebin Home'
id: automation_ebin_home
mode: restart
trigger:
- platform: state
entity_id:
- binary_sensor.ebin_home
to: "on"
- platform: time_pattern
minutes: "/5"
condition:
- condition: and
conditions:
- condition: state
entity_id: binary_sensor.have_custody
state: 'off'
- condition: state
entity_id: person.kristy
state: 'home'
action:
- service: input_boolean.turn_off
entity_id: input_boolean.ebin_travelling
- service: input_boolean.turn_on
entity_id: input_boolean.ebin_home
+41
View File
@@ -0,0 +1,41 @@
alias: Ebin In Bed
id: automation_ebin_in_bed
mode: restart
trigger:
- platform: state
entity_id: binary_sensor.white_bed_occupied
to: 'on'
for: '00:05:00'
- platform: state
entity_id: binary_sensor.black_bed_occupied
to: 'on'
for: '00:05:00'
- platform: homeassistant
event: start
condition:
- condition: state
entity_id:
- input_boolean.ebin_home
- input_boolean.kids_bedtime
state: 'on'
- condition: state
entity_id: input_boolean.ebin_in_bed
state: 'off'
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.black_bed_occupied
state: 'on'
for:
minutes: 5
- condition: state
entity_id: binary_sensor.white_bed_occupied
state: 'on'
for:
minutes: 5
action:
- service: homeassistant.turn_on
entity_id: input_boolean.ebin_in_bed
@@ -0,0 +1,17 @@
alias: 'Ebin Location Update'
id: automation_ebin_location_update
mode: restart
trigger:
# I've moved
- platform: state
entity_id:
- input_select.ebin_status_dropdown
- input_boolean.ebin_home
condition:
- condition: template
value_template: '{{ trigger.from_state.state != trigger.to_state.state }}'
action:
- service: script.turn_on
entity_id: script.ebin_travel_sensor
@@ -0,0 +1,46 @@
alias: Ebin Status at Startup
id: automation_ebin_status_at_startup
mode: restart
trigger:
- platform: homeassistant
event: start
condition:
- condition: state
entity_id: input_boolean.ebin_home
state: 'on'
action:
- choose:
- conditions:
- condition: time
after: '20:00:00'
before: '21:00:00'
sequence:
- service: input_boolean.turn_on
entity_id:
- input_boolean.ebin_in_bed
- service: input_boolean.turn_on
entity_id:
- input_boolean.ebin_is_awake
- conditions:
- condition: time
after: '21:00:00'
before: '06:00:00'
sequence:
- service: input_boolean.turn_on
entity_id:
- input_boolean.ebin_in_bed
- service: input_boolean.turn_off
entity_id:
- input_boolean.ebin_is_awake
default:
- service: input_boolean.turn_off
entity_id:
- input_boolean.ebin_in_bed
- service: input_boolean.turn_on
entity_id:
- input_boolean.ebin_is_awake
@@ -0,0 +1,28 @@
alias: Emmett Asleep
id: automation_emmett_asleep
mode: restart
trigger:
- platform: state
id: in_bed
entity_id: input_boolean.emmett_in_bed
to: 'on'
for: '00:20:00'
- platform: homeassistant
event: start
condition:
- condition: state
entity_id:
- input_boolean.emmett_home
- input_boolean.kids_bedtime
state: 'on'
- condition: state
entity_id: input_boolean.emmett_is_awake
state: 'on'
- condition: trigger
id: "in_bed"
action:
- service: homeassistant.turn_off
entity_id: input_boolean.emmett_is_awake
@@ -0,0 +1,20 @@
alias: 'Emmett Away'
id: automation_emmett_away
mode: restart
trigger:
- platform: state
entity_id: binary_sensor.emmett_home
to: 'off'
- platform: time_pattern
minutes: "/5"
condition:
- condition: state
entity_id: input_boolean.emmett_home
state: 'on'
- condition: state
entity_id: binary_sensor.emmett_home
state: 'off'
action:
- service: input_boolean.turn_off
entity_id: input_boolean.emmett_home
@@ -0,0 +1,22 @@
alias: 'Emmett Home'
id: automation_emmett_home
mode: restart
trigger:
- platform: state
entity_id: binary_sensor.emmett_home
to: 'on'
- platform: time_pattern
minutes: "/5"
condition:
- condition: state
entity_id: input_boolean.emmett_home
state: 'off'
- condition: state
entity_id: binary_sensor.emmett_home
state: 'on'
action:
- service: input_boolean.turn_off
entity_id: input_boolean.emmett_travelling
- service: input_boolean.turn_on
entity_id: input_boolean.emmett_home
@@ -0,0 +1,38 @@
alias: Emmett In Bed
id: automation_emmett_in_bed
mode: restart
trigger:
- platform: state
entity_id: binary_sensor.black_bed_occupied
to: 'on'
for: '00:10:00'
- platform: state
entity_id: input_boolean.kids_bedtime
to: 'on'
- platform: homeassistant
event: start
condition:
- condition: state
entity_id:
- input_boolean.emmett_home
- input_boolean.kids_bedtime
state: 'on'
- condition: state
entity_id:
- binary_sensor.black_bed_occupied
state: 'on'
for: '00:10:00'
- condition: state
entity_id: input_boolean.emmett_in_bed
state: 'off'
#- condition: state
# entity_id: binary_sensor.black_bed_occupied
# state: 'on'
# for:
# minutes: 5
action:
- service: homeassistant.turn_on
entity_id: input_boolean.emmett_in_bed
@@ -0,0 +1,25 @@
alias: Emmett Location Update
id: automation_emmett_location_update
mode: restart
trigger:
# Emmett moved
- platform: state
entity_id:
- input_select.emmett_status_dropdown
- input_boolean.emmett_home
# Clint moved
- input_select.clint_status_dropdown
- input_boolean.clint_home
# Custody changed
- binary_sensor.have_custody
# Sleeping status changed
- input_boolean.emmett_is_awake
- input_boolean.emmett_in_bed
condition:
- condition: template
value_template: "{{ trigger.from_state.state != trigger.to_state.state }}"
action:
- service: script.turn_on
entity_id: script.emmett_travel_sensor
@@ -0,0 +1,46 @@
alias: Emmett Status at Startup
id: automation_emmett_status_at_startup
mode: restart
trigger:
- platform: homeassistant
event: start
condition:
- condition: state
entity_id: input_boolean.emmett_home
state: 'on'
action:
- choose:
- conditions:
- condition: time
after: '20:00:00'
before: '21:00:00'
sequence:
- service: input_boolean.turn_on
entity_id:
- input_boolean.emmett_in_bed
- service: input_boolean.turn_on
entity_id:
- input_boolean.emmett_is_awake
- conditions:
- condition: time
after: '21:00:00'
before: '06:00:00'
sequence:
- service: input_boolean.turn_on
entity_id:
- input_boolean.emmett_in_bed
- service: input_boolean.turn_off
entity_id:
- input_boolean.emmett_is_awake
default:
- service: input_boolean.turn_off
entity_id:
- input_boolean.emmett_in_bed
- service: input_boolean.turn_on
entity_id:
- input_boolean.emmett_is_awake
@@ -0,0 +1,20 @@
alias: 'Guest Location Update'
id: automation_guest_location_update
mode: restart
trigger:
# Guest moved
- platform: state
entity_id:
- input_select.guest_status_dropdown
- input_boolean.guest_home
# Sleeping status changed
- input_boolean.guest_is_awake
- input_boolean.guest_in_bed
condition:
- condition: template
value_template: '{{ trigger.from_state.state != trigger.to_state.state }}'
action:
- service: script.turn_on
entity_id: script.guest_travel_sensor
@@ -0,0 +1,46 @@
alias: Guest Status at Startup
id: automation_guest_status_at_startup
mode: restart
trigger:
- platform: homeassistant
event: start
condition:
- condition: state
entity_id: input_boolean.guest_home
state: 'on'
action:
- choose:
- conditions:
- condition: time
after: '23:30:00'
before: '00:00:00'
sequence:
- service: input_boolean.turn_on
entity_id:
- input_boolean.guest_in_bed
- service: input_boolean.turn_on
entity_id:
- input_boolean.guest_is_awake
- conditions:
- condition: time
after: '00:00:00'
before: '06:00:00'
sequence:
- service: input_boolean.turn_on
entity_id:
- input_boolean.guest_in_bed
- service: input_boolean.turn_off
entity_id:
- input_boolean.guest_is_awake
default:
- service: input_boolean.turn_off
entity_id:
- input_boolean.guest_in_bed
- service: input_boolean.turn_on
entity_id:
- input_boolean.guest_is_awake
@@ -0,0 +1,26 @@
alias: Kristy Asleep
id: automation_kristy_asleep
initial_state: 'on'
trigger:
- platform: state
entity_id: input_boolean.kristy_in_bed
to: 'on'
for:
minutes: 15
condition:
- condition: and
conditions:
- condition: state
entity_id: input_boolean.kristy_is_awake
state: 'on'
- condition: state
entity_id: input_boolean.kristy_home
state: 'on'
- condition: time
after: '20:30:00'
before: '04:00:00'
action:
- service: input_boolean.turn_off
entity_id: input_boolean.kristy_is_awake
@@ -0,0 +1,15 @@
alias: Kristy Awake
id: automation_kristy_awake
mode: restart
trigger:
- platform: state
entity_id: input_boolean.kristy_in_bed
to: 'off'
for: '00:05:00'
action:
- service: input_boolean.turn_on
entity_id: input_boolean.kristy_is_awake
- service: script.turn_on
entity_id: script.kristy_travel_sensor
@@ -0,0 +1,37 @@
alias: 'Kristy Away'
id: automation_kristy_away
mode: restart
trigger:
- platform: state
entity_id:
- device_tracker.kristy_s_phone
from: 'home'
- platform: homeassistant
event: start
condition:
- condition: state
entity_id: device_tracker.kristy_s_phone
state: 'not_home'
action:
- choose:
- conditions:
- condition: state
entity_id: device_tracker.kristy_s_phone
state: 'not_home'
sequence:
- service: input_boolean.turn_off
entity_id: input_boolean.kristy_home
- service: input_boolean.turn_on
entity_id: input_boolean.allow_announcements
- service: input_boolean.turn_on
entity_id: input_boolean.out_of_bed_alert
- delay: '00:00:30'
@@ -0,0 +1,41 @@
alias: 'Kristy Home'
id: automation_kristy_home
mode: restart
trigger:
- platform: homeassistant
event: start
- platform: state
entity_id:
- group.person_kristy
- device_tracker.kristy_s_phone
to: 'home'
- platform: event
event_type: automation_reloaded
condition:
- alias: 'They were previously considered away'
condition: state
entity_id: input_boolean.kristy_home
state: 'off'
- alias: 'At least one tracker is home'
condition: numeric_state
entity_id: group.person_kristy
above: 0
value_template: "{{ dict((states|selectattr('entity_id', 'in', state_attr('group.person_kristy', 'entity_id'))|list)|groupby('state'))['home']|count }}"
action:
- service: input_boolean.turn_off
entity_id: input_boolean.kristy_travelling
- service: input_boolean.turn_on
entity_id: input_boolean.kristy_home
- service: input_boolean.turn_off
entity_id: input_boolean.allow_announcements
- service: input_boolean.turn_off
entity_id: input_boolean.out_of_bed_alert
@@ -0,0 +1,39 @@
alias: Kristy in Bed
id: automation_kristy_in_bed
trigger:
# Bed in master bedroom is occupied
- platform: state
entity_id: binary_sensor.master_bed_occupied
to: 'on'
# Radio playing
- platform: state
entity_id: media_player.master_bedroom_clock
to: 'playing'
- platform: state
entity_id: media_player.master_bedroom_clock
to: 'idle'
# Light on
- platform: state
entity_id: light.master_bedroom_hue
to: 'on'
condition:
- condition: state
entity_id: input_boolean.kristy_in_bed
state: 'off'
- condition: state
entity_id: input_boolean.kristy_home
state: 'on'
- alias: "Its between 8:30PM and 5AM"
condition: time
after: '20:30:00'
before: '05:00:00'
- alias: "The bed is occupied"
condition: state
entity_id: binary_sensor.master_bed_occupied
state: 'on'
action:
- service: input_boolean.turn_on
entity_id: input_boolean.kristy_in_bed
@@ -0,0 +1,18 @@
alias: 'Kristy Location Update'
id: automation_kristy_location_update
mode: restart
trigger:
# I've moved
- platform: state
entity_id:
- input_select.kristy_status_dropdown
- input_boolean.kristy_home
condition:
- condition: template
value_template: '{{ trigger.from_state.state != trigger.to_state.state }}'
action:
- service: script.turn_on
entity_id: script.kristy_travel_sensor
@@ -0,0 +1,49 @@
alias: Kristy Status at Startup
id: automation_kristy_status_at_startup
mode: restart
trigger:
- platform: homeassistant
event: start
condition:
- condition: state
entity_id: input_boolean.kristy_home
state: 'on'
action:
- choose:
- conditions:
- condition: time
after: '23:30:00'
before: '00:00:00'
sequence:
- service: input_boolean.turn_on
entity_id:
- input_boolean.kristy_in_bed
- service: input_boolean.turn_on
entity_id:
- input_boolean.kristy_is_awake
- conditions:
- condition: time
after: '00:00:00'
before: '06:00:00'
sequence:
- service: input_boolean.turn_on
entity_id:
- input_boolean.kristy_in_bed
- service: input_boolean.turn_off
entity_id:
- input_boolean.kristy_is_awake
default:
- service: input_boolean.turn_off
entity_id:
- input_boolean.kristy_in_bed
- service: input_boolean.turn_on
entity_id:
- input_boolean.kristy_is_awake
@@ -0,0 +1,17 @@
alias: 'Marshall Away'
id: automation_marshall_away
mode: restart
trigger:
- platform: state
entity_id: device_tracker.nmap_tracker_fe_cf_82_b2_22_e0
to: 'not_home'
condition:
- condition: state
entity_id: input_boolean.marshall_home
state: 'on'
action:
- service: input_boolean.turn_off
entity_id: input_boolean.marshall_home
@@ -0,0 +1,34 @@
alias: 'Marshall Home'
id: automation_marshall_home
mode: restart
trigger:
- platform: homeassistant
event: start
- platform: state
entity_id:
- group.person_marshall
- device_tracker.nmap_tracker_fe_cf_82_b2_22_e0
to: 'home'
- platform: event
event_type: automation_reloaded
condition:
- alias: 'They were previously considered away'
condition: state
entity_id: input_boolean.marshall_home
state: 'off'
- alias: 'At least one tracker is home'
condition: numeric_state
entity_id: group.person_marshall
above: 0
value_template: "{{ dict((states|selectattr('entity_id', 'in', state_attr('group.person_marshall', 'entity_id'))|list)|groupby('state'))['home']|count }}"
action:
- service: input_boolean.turn_off
entity_id: input_boolean.marshall_travelling
- service: input_boolean.turn_on
entity_id: input_boolean.marshall_home
@@ -0,0 +1,20 @@
alias: 'Marshall Location Update'
id: automation_marshall_location_update
mode: restart
trigger:
# I've moved
- platform: state
entity_id:
- input_select.marshall_status_dropdown
- input_boolean.marshall_home
condition:
- condition: template
value_template: '{{ trigger.from_state.state != trigger.to_state.state }}'
- condition: state
entity_id: script.marshall_travel_sensor
state: 'off'
action:
- service: script.turn_on
entity_id: script.marshall_travel_sensor
@@ -0,0 +1,46 @@
alias: Marshall Status at Startup
id: automation_marshall_status_at_startup
mode: restart
trigger:
- platform: homeassistant
event: start
condition:
- condition: state
entity_id: input_boolean.marshall_home
state: 'on'
action:
- choose:
- conditions:
- condition: time
after: '22:00:00'
before: '23:00:00'
sequence:
- service: input_boolean.turn_on
entity_id:
- input_boolean.marshall_in_bed
- service: input_boolean.turn_on
entity_id:
- input_boolean.marshall_is_awake
- conditions:
- condition: time
after: '23:00:00'
before: '06:00:00'
sequence:
- service: input_boolean.turn_on
entity_id:
- input_boolean.marshall_in_bed
- service: input_boolean.turn_off
entity_id:
- input_boolean.marshall_is_awake
default:
- service: input_boolean.turn_off
entity_id:
- input_boolean.marshall_in_bed
- service: input_boolean.turn_on
entity_id:
- input_boolean.marshall_is_awake
+20
View File
@@ -0,0 +1,20 @@
alias: 'Tess Away'
id: automation_tess_away
mode: restart
trigger:
- platform: state
entity_id:
- person.kristy
to: 'not_home'
- platform: state
entity_id:
- person.tess
to: 'not_home'
condition:
- condition: state
entity_id: input_boolean.tess_home
state: 'on'
action:
- service: input_boolean.turn_off
entity_id: input_boolean.tess_home
+29
View File
@@ -0,0 +1,29 @@
alias: 'Tess Home'
id: automation_tess_home
mode: restart
trigger:
- platform: event
event_type: automation_reloaded
- platform: state
entity_id:
- group.person_tess
- device_tracker.apple_17_a6_78
to: 'home'
condition:
- alias: 'They were previously considered away'
condition: state
entity_id: input_boolean.tess_home
state: 'off'
- alias: 'At least one tracker is home'
condition: numeric_state
entity_id: group.person_tess
above: 0
value_template: "{{ dict((states|selectattr('entity_id', 'in', state_attr('group.person_tess', 'entity_id'))|list)|groupby('state'))['home']|count }}"
action:
- service: input_boolean.turn_off
entity_id: input_boolean.tess_travelling
- service: input_boolean.turn_on
entity_id: input_boolean.tess_home
@@ -0,0 +1,20 @@
alias: 'Tess Location Update'
id: automation_tess_location_update
mode: restart
trigger:
# I've moved
- platform: state
entity_id:
- input_select.tess_status_dropdown
- input_boolean.tess_home
condition:
- condition: template
value_template: '{{ trigger.from_state.state != trigger.to_state.state }}'
- condition: state
entity_id: script.tess_travel_sensor
state: 'off'
action:
- service: script.turn_on
entity_id: script.tess_travel_sensor
@@ -0,0 +1,46 @@
alias: Tess Status at Startup
id: automation_tess_status_at_startup
mode: restart
trigger:
- platform: homeassistant
event: start
condition:
- condition: state
entity_id: input_boolean.tess_home
state: 'on'
action:
- choose:
- conditions:
- condition: time
after: '22:00:00'
before: '23:00:00'
sequence:
- service: input_boolean.turn_on
entity_id:
- input_boolean.tess_in_bed
- service: input_boolean.turn_on
entity_id:
- input_boolean.tess_is_awake
- conditions:
- condition: time
after: '23:00:00'
before: '06:00:00'
sequence:
- service: input_boolean.turn_on
entity_id:
- input_boolean.tess_in_bed
- service: input_boolean.turn_off
entity_id:
- input_boolean.tess_is_awake
default:
- service: input_boolean.turn_off
entity_id:
- input_boolean.tess_in_bed
- service: input_boolean.turn_on
entity_id:
- input_boolean.tess_is_awake
+69
View File
@@ -0,0 +1,69 @@
alias: Adults Asleep
id: automation_adults_asleep
mode: queued
trigger:
- platform: homeassistant
event: start
- platform: state
entity_id:
- input_boolean.clint_is_awake
- input_boolean.kristy_is_awake
- input_boolean.guest_is_awake
to: 'off'
action:
- choose:
- conditions:
- condition: or
conditions:
- condition: and
conditions:
- condition: state
entity_id: input_boolean.clint_is_awake
state: 'off'
- condition: state
entity_id: input_boolean.clint_home
state: 'on'
- condition: and
conditions:
- condition: state
entity_id: input_boolean.kristy_is_awake
state: 'off'
- condition: state
entity_id: input_boolean.kristy_home
state: 'on'
- condition: and
conditions:
- condition: state
entity_id: input_boolean.guest_is_awake
state: 'off'
- condition: state
entity_id: input_boolean.guest_home
state: 'on'
sequence:
- service: input_boolean.turn_on
data:
entity_id:
- input_boolean.asleep
- input_boolean.teens_asleep
- input_boolean.kids_asleep
- service: input_select.select_option
target:
entity_id: input_select.master_bedroom_mode
data:
option: Nightlight
- choose:
- conditions:
- condition: state
entity_id: binary_sensor.patio_door_contact
state: 'off'
sequence:
- service: lock.lock
target:
entity_id: lock.patio_door
default:
- service: input_boolean.turn_off
data:
entity_id: input_boolean.asleep
+95
View File
@@ -0,0 +1,95 @@
alias: Adults Awake
id: automation_adults_awake
mode: restart
trigger:
# Consider the house awake if it is after 4:30AM and Kristy and I are both home and awake
- platform: state
entity_id:
- binary_sensor.adults_in_bed
- input_boolean.clint_in_bed
- input_boolean.clint_is_awake
- input_boolean.kristy_in_bed
- input_boolean.kristy_is_awake
- binary_sensor.master_bed_occupied
- platform: time
id: wake_clint
at: input_datetime.clint_next_alarm
- platform: state
id: late_morning
entity_id: binary_sensor.late_morning
from: 'off'
to: 'on'
- platform: homeassistant
event: start
condition:
- condition: time
after: '04:30:00'
- condition: time
before: '10:00:00'
- condition: or
conditions:
- condition: trigger
id: late_morning
- condition: trigger
id: wake_clint
- condition: state
entity_id: binary_sensor.master_bed_occupied
state: 'off'
for: '00:10:00'
- condition: and
conditions:
- condition: or
conditions:
- condition: state
entity_id: input_boolean.kristy_home
state: 'off'
- condition: and
conditions:
- condition: or
conditions:
- condition: state
entity_id: input_boolean.kristy_is_awake
state: 'on'
- condition: state
entity_id: input_boolean.kristy_in_bed
state: 'off'
- condition: state
entity_id: input_boolean.kristy_home
state: 'on'
- condition: or
conditions:
- condition: state
entity_id: input_boolean.clint_home
state: 'off'
- condition: and
conditions:
- condition: state
entity_id: input_boolean.clint_home
state: 'on'
- condition: or
conditions:
- condition: state
entity_id: input_boolean.clint_is_awake
state: 'on'
- condition: state
entity_id: input_boolean.clint_in_bed
state: 'off'
action:
- service: input_boolean.turn_off
entity_id:
- input_boolean.bedtime
- input_boolean.asleep
- input_boolean.master_bedroom_asleep
- service: input_select.select_option
target:
entity_id: input_select.master_bedroom_mode
data:
option: Auto
+27
View File
@@ -0,0 +1,27 @@
alias: Adults Away
id: automation_adults_away
mode: restart
trigger:
- platform: state
entity_id:
- input_boolean.clint_home
- input_boolean.kristy_home
- input_boolean.guest_home
to: 'off'
condition:
# All away
- condition: and
conditions:
- condition: state
entity_id: input_boolean.clint_home
state: 'off'
- condition: state
entity_id: input_boolean.kristy_home
state: 'off'
- condition: state
entity_id: input_boolean.guest_home
state: 'off'
action:
- service: input_boolean.turn_on
entity_id: input_boolean.adults_away
@@ -0,0 +1,26 @@
alias: "Adults away something open"
id: automation_adults_away_something_open
mode: restart
trigger:
- platform: state
entity_id: input_boolean.adults_away
from: "off"
to: "on"
condition:
- condition: state
entity_id: binary_sensor.something_open
state: 'on'
- condition: state
entity_id: input_boolean.home_occupied
state: "off"
action:
# Notify the last person to leave
- service: notify.mobile_app_pixel_7
data:
message: >-
{% if as_timestamp(states.input_boolean.kristy_home.last_updated) > as_timestamp(states.input_boolean.clint_home.last_updated) %}
The following are open: {{ dict((states|selectattr('entity_id', 'in', state_attr('group.my_exterior_windows', 'entity_id') + state_attr('group.my_exterior_doors', 'entity_id'))|list)|groupby('state'))['on']|map(attribute='name')|list|join(', ') }}
{% else %}
The following are open: {{ dict((states|selectattr('entity_id', 'in', state_attr('group.my_exterior_windows', 'entity_id') + state_attr('group.my_exterior_doors', 'entity_id'))|list)|groupby('state'))['on']|map(attribute='name')|list|join(', ') }}
{% endif %}
+18
View File
@@ -0,0 +1,18 @@
alias: 'Adults returned'
id: automation_adults_returned
mode: restart
trigger:
- platform: state
entity_id:
- input_boolean.clint_home
- input_boolean.kristy_home
- input_boolean.guest_home
to: 'on'
condition:
- condition: state
entity_id: input_boolean.adults_away
state: 'on'
action:
- service: input_boolean.turn_off
entity_id: input_boolean.adults_away
+57
View File
@@ -0,0 +1,57 @@
alias: 'All away'
id: automation_all_away
mode: restart
trigger:
- platform: state
entity_id:
- input_boolean.clint_home
- input_boolean.kristy_home
- input_boolean.guest_home
- input_boolean.emmett_home
- input_boolean.bridget_home
- input_boolean.marshall_home
- input_boolean.tess_home
- input_boolean.ebin_home
- input_boolean.front_room_occupied
- input_boolean.computer_area_occupied
- input_boolean.kitchen_occupied
- input_boolean.great_room_occupied
to: 'off'
condition:
# Adults are away
- condition: and
conditions:
- condition: state
entity_id: input_boolean.clint_home
state: 'off'
- condition: state
entity_id: input_boolean.kristy_home
state: 'off'
- condition: state
entity_id: input_boolean.guest_home
state: 'off'
# Kids are away
- condition: state
entity_id: input_boolean.emmett_home
state: 'off'
- condition: state
entity_id: input_boolean.bridget_home
state: 'off'
- condition: state
entity_id: input_boolean.marshall_home
state: 'off'
- condition: state
entity_id: input_boolean.tess_home
state: 'off'
- condition: state
entity_id: input_boolean.ebin_home
state: 'off'
# And not in guest mode
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
action:
- service: input_boolean.turn_on
entity_id: input_boolean.all_away
- delay: '00:00:30'
+13
View File
@@ -0,0 +1,13 @@
alias: 'All returned'
id: automation_all_returned
mode: restart
trigger:
- platform: state
entity_id:
- input_boolean.clint_home
- input_boolean.kristy_home
to: 'on'
action:
- service: input_boolean.turn_off
entity_id: input_boolean.all_away
+52
View File
@@ -0,0 +1,52 @@
alias: "Almost Bedtime"
id: automation_almost_bedtime
initial_state: on
trigger:
platform: time
at: input_datetime.kids_five_minute_warning_time
condition:
- condition: state
entity_id: input_boolean.announce_bedtime
state: "on"
- condition: or
conditions:
- condition: state
entity_id: input_boolean.emmett_home
state: "on"
- condition: state
entity_id: input_boolean.bridget_home
state: "on"
- condition: state
entity_id: input_boolean.ebin_home
state: "on"
action:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.kids_bedtime
- service: media_player.volume_set
data:
volume_level: 0.65
target:
entity_id:
- media_player.bathroom_mini
- media_player.kitchen
- service: script.make_clever_announcement
data:
media_content_id: media-source://media_source/local/Sounds/tts/almost_bedtime.mp3
volume: 0.5
# Because of how we're calling the script, the automation won't continue until the script is done, so we don't need a delay here
#- delay: '00:00:10'
- choose:
- conditions:
- condition: template
value_template: "{{states('switch.nursery_bed_lights') == 'off' }}"
sequence:
- service: input_select.select_option
target:
entity_id: input_select.nursery_wled
data:
option: Read
@@ -0,0 +1,44 @@
alias: 'Almost Bedtime TTS'
id: automation_almost_bedtime_tts
initial_state: off
trigger:
platform: time
at: input_datetime.kids_five_minute_warning_time
condition:
- condition: state
entity_id: input_boolean.announce_bedtime
state: 'on'
- condition: or
conditions:
- condition: state
entity_id: input_boolean.emmett_home
state: 'on'
- condition: state
entity_id: input_boolean.bridget_home
state: 'on'
- condition: state
entity_id: input_boolean.ebin_home
state: 'on'
action:
- service: media_player.volume_set
data_template:
entity_id:
- media_player.bathroom_mini
- media_player.bathroom_mini
- media_player.front_room_hub
- media_player.kitchen
- media_player.nursery_hub
- media_player.master_bedroom_clock
volume_level: 0.7
- delay: '00:00:03'
- service: tts.google_translate_say
entity_id: media_player.all_speakers
data_template:
message: Alright kids. Its almost bedtime. You've got 5 minutes.
- delay: '00:00:10'
- service: media_player.turn_off
entity_id: media_player.all_speakers
- service: input_select.select_option
entity_id: input_select.automatic_light_profile
data:
option: Dimmed
+52
View File
@@ -0,0 +1,52 @@
initial_state: 'on'
alias: 'Bedtime'
id: automation_bedtime
trigger:
- platform: homeassistant
event: start
- platform: state
entity_id:
- input_boolean.kristy_in_bed
- input_boolean.clint_in_bed
to: 'on'
condition:
- condition: and
conditions:
- condition: or
conditions:
- condition: state
entity_id: input_boolean.kristy_home
state: 'off'
- condition: and
conditions:
- condition: state
entity_id: input_boolean.kristy_in_bed
state: 'on'
- condition: state
entity_id: input_boolean.kristy_home
state: 'on'
- condition: or
conditions:
- condition: state
entity_id: input_boolean.clint_home
state: 'off'
- condition: and
conditions:
- condition: state
entity_id: input_boolean.clint_in_bed
state: 'on'
- condition: state
entity_id: input_boolean.clint_home
state: 'on'
action:
- service: input_boolean.turn_on
entity_id:
- input_boolean.bedtime
- input_boolean.teens_bedtime
- input_boolean.kids_bedtime
- service: input_select.select_option
target:
entity_id: input_select.automatic_light_profile
data:
option: Nightlight
@@ -0,0 +1,40 @@
alias: 'Bedtime something open'
id: automation_bedtime_something_open
mode: restart
trigger:
- platform: state
entity_id: input_boolean.clint_is_awake
to: 'off'
condition:
condition: and
conditions:
# We're both in bed
- condition: state
entity_id: input_boolean.clint_is_awake
state: 'off'
- condition: state
entity_id: binary_sensor.something_open
state: 'on'
- condition: state
entity_id: binary_sensor.impending_rain
state: 'on'
action:
- service: media_player.turn_on
data_template:
entity_id: media_player.master_bedroom_clock
- service: media_player.volume_set
data_template:
volume_level: 0.30
entity_id: media_player.master_bedroom_clock
- service: tts.google_translate_say
data_template:
entity_id: media_player.master_bedroom_clock
message: >-
The following are open:
{{ dict((states|selectattr('entity_id', 'in', state_attr('group.my_exterior_windows', 'entity_id') + state_attr('group.my_exterior_doors', 'entity_id'))|list)|groupby('state'))['on']|map(attribute='name')|list|join(', ') }}
- delay: '00:01:00'
- service: media_player.turn_off
data:
entity_id: media_player.master_bedroom_clock
@@ -0,0 +1,53 @@
alias: Continue Nursery Noise
id: automation_continue_nursery_noise
trigger:
- platform: state
entity_id: media_player.nursery_hub
from: "playing"
condition:
- condition: state
entity_id: input_boolean.nursery_asleep
state: 'on'
- condition: or
conditions:
- condition: and
conditions:
- condition: state
entity_id: input_boolean.emmett_in_bed
state: 'on'
- condition: state
entity_id: input_boolean.emmett_home
state: 'on'
- condition: and
conditions:
- condition: state
entity_id: input_boolean.bridget_in_bed
state: 'on'
- condition: state
entity_id: input_boolean.bridget_home
state: 'on'
- condition: and
conditions:
- condition: state
entity_id: input_boolean.ebin_in_bed
state: 'on'
- condition: state
entity_id: input_boolean.ebin_home
state: 'on'
- condition: state
entity_id: input_select.nursery_mode
state: 'Night on'
action:
- service: input_select.select_option
data:
entity_id: input_select.google_home
option: 'Nursery'
- service: input_select.select_option
data:
entity_id: input_select.ambient_sound
option: 'Random White Noise'
- service: input_number.set_value
data:
entity_id: input_number.volume_ambientsounds
value: '0.35'
- service: script.ambientsounds
+168
View File
@@ -0,0 +1,168 @@
alias: "Goodnight Kids"
id: automation_goodnight_kids
initial_state: on
trigger:
platform: time
at: input_datetime.kids_bedtime_announcement_time
condition:
- condition: state
entity_id: input_boolean.announce_bedtime
state: "on"
- condition: or
conditions:
- condition: state
entity_id: input_boolean.emmett_home
state: "on"
- condition: state
entity_id: input_boolean.bridget_home
state: "on"
- condition: state
entity_id: input_boolean.ebin_home
state: "on"
action:
- service: homeassistant.turn_on
entity_id: input_boolean.kids_bedtime
- choose:
- conditions:
- condition: template
value_template: "{{states('media_player.announcements') == 'unknown' }}"
sequence:
- service: script.make_clever_announcement
data:
entity_id:
- media_player.bathroom_mini
- media_player.computer_area_hub
media_content_id: >-
{% if is_state('input_boolean.emmett_home', 'on') %}
{% if is_state('input_boolean.bridget_home', 'on') %}
{% if is_state('input_boolean.ebin_home', 'on') %}
media-source://media_source/local/Sounds/tts/goodnight_emmett_bridget_ebin.mp3
{% else %}
media-source://media_source/local/Sounds/tts/goodnight_emmett_bridget.mp3
{% endif %}
{% elif is_state('input_boolean.ebin_home','on') %}
media-source://media_source/local/Sounds/tts/goodnight_emmett_ebin.mp3
{% else %}
media-source://media_source/local/Sounds/tts/goodnight_emmett.mp3
{% endif %}
{% elif is_state('input_boolean.bridget_home', 'on') %}
{% if is_state('input_boolean.ebin_home', 'on') %}
media-source://media_source/local/Sounds/tts/goodnight_bridget_ebin.mp3
{% else %}
media-source://media_source/local/Sounds/tts/goodnight_bridget.mp3
{% endif %}
{% elif is_state('input_boolean.ebin_home', 'on') %}
media-source://media_source/local/Sounds/tts/goodnight_ebin.mp3
{% endif %}
volume: 0.5
default:
- service: script.make_clever_announcement
data:
entity_id: media_player.announcements
media_content_id: >-
{% if is_state('input_boolean.emmett_home', 'on') %}
{% if is_state('input_boolean.bridget_home', 'on') %}
{% if is_state('input_boolean.ebin_home', 'on') %}
media-source://media_source/local/Sounds/tts/goodnight_emmett_bridget_ebin.mp3
{% else %}
media-source://media_source/local/Sounds/tts/goodnight_emmett_bridget.mp3
{% endif %}
{% elif is_state('input_boolean.ebin_home','on') %}
media-source://media_source/local/Sounds/tts/goodnight_emmett_ebin.mp3
{% else %}
media-source://media_source/local/Sounds/tts/goodnight_emmett.mp3
{% endif %}
{% elif is_state('input_boolean.bridget_home', 'on') %}
{% if is_state('input_boolean.ebin_home', 'on') %}
media-source://media_source/local/Sounds/tts/goodnight_bridget_ebin.mp3
{% else %}
media-source://media_source/local/Sounds/tts/goodnight_bridget.mp3
{% endif %}
{% elif is_state('input_boolean.ebin_home', 'on') %}
media-source://media_source/local/Sounds/tts/goodnight_ebin.mp3
{% endif %}
volume: 0.5
# Because of how we're calling the script, the automation won't continue until the script is done, so we don't need a delay here
#- delay: '00:00:10'
- choose:
- conditions: "{{is_state_attr('media_player.front_room_tv','source','YouTube')}}"
sequence:
- service: homeassistant.turn_off
entity_id: media_player.front_room_tv
- choose:
- conditions: "{{is_state_attr('media_player.downstairs_roku','source','YouTube')}}"
sequence:
- service: media_player.select_source
data:
source: Home
target:
entity_id: media_player.downstairs_roku
- service: homeassistant.turn_off
entity_id: switch.shelly_projector
- service: input_select.select_option
data:
entity_id: input_select.automatic_light_profile
option: Dimmed
- delay: "00:00:01"
# - service: media_player.play_media
# target:
# entity_id: media_player.front_room_hub
# data:
# media_content_id: camera-casting-yml/nursery-camera
# media_content_type: lovelace
# metadata:
# title: Nursery Camera
# thumbnail: https://brands.home-assistant.io/_/lovelace/logo.png
# media_class: app
# children_media_class: null
# navigateIds:
# - {}
# - media_content_type: lovelace
# media_content_id: ""
# - media_content_type: lovelace
# media_content_id: camera-casting-yml
- choose:
- conditions: "{{is_state('input_boolean.ebin_home','on')}}"
sequence:
- service: input_select.select_option
target:
entity_id: input_select.nursery_wled
data:
option: "Off"
- service: input_select.select_option
target:
entity_id: input_select.nursery_mode
data:
option: "Nightlight"
- delay: "00:15:00"
- choose:
- conditions: "{{is_state('input_boolean.emmett_home','on') or is_state('input_boolean.bridget_home','on')}}"
sequence:
- service: input_button.press
data: {}
target:
entity_id: input_button.nursery_bedtime
- delay: "00:45:00"
- choose:
- conditions: "{{is_state('input_boolean.emmett_home','on') or is_state('input_boolean.bridget_home','on')}}"
sequence:
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.nursery_asleep
+167
View File
@@ -0,0 +1,167 @@
alias: 'Goodnight Kids TTS'
id: automation_goodnight_kids_tts
initial_state: off
trigger:
platform: time
at: input_datetime.kids_bedtime_announcement_time
condition:
- condition: state
entity_id: input_boolean.announce_bedtime
state: 'on'
- condition: or
conditions:
- condition: state
entity_id: input_boolean.emmett_home
state: 'on'
- condition: state
entity_id: input_boolean.bridget_home
state: 'on'
- condition: state
entity_id: input_boolean.ebin_home
state: 'on'
action:
- service: homeassistant.turn_on
entity_id: input_boolean.kids_bedtime
- service: media_player.volume_set
data_template:
entity_id:
- media_player.bathroom_mini
- media_player.bathroom_mini
- media_player.front_room_hub
- media_player.kitchen
- media_player.nursery_hub
- media_player.master_bedroom_clock
volume_level: 0.7
- delay: '00:00:01'
- service: tts.google_translate_say
entity_id: media_player.all_speakers
data_template:
message: >
It is time for bed.
{% if is_state('input_boolean.emmett_home', 'on') %}
Good night Emmett
{% if is_state('input_boolean.bridget_home', 'on') %}
{% if is_state('input_boolean.ebin_home', 'on') %}
Good night Bridget and good night Ebin
{% else %}
and good night Bridget
{% endif %}
{% elif is_state('input_boolean.ebin_home','on') %}
and good night Ebin
{% endif %}
{% elif is_state('input_boolean.bridget_home', 'on') %}
{% if is_state('input_boolean.ebin_home', 'on') %}
Good night Bridget and good night Ebin
{% else %}
Good Night Bridget
{% endif %}
{% elif is_state('input_boolean.ebin_home', 'on') %}
Good night Ebin
{% endif %}
- delay: '00:00:10'
- service: homeassistant.turn_off
entity_id:
- media_player.all_speakers
- media_player.front_room_tv
- media_player.downstairs_roku
- switch.shelly_projector
- service: input_select.select_option
data:
entity_id: input_select.automatic_light_profile
option: Dimmed
- choose:
- conditions:
- condition: state
entity_id: input_boolean.emmett_home
state: 'on'
- condition: state
entity_id: input_boolean.emmett_in_bed
state: 'off'
- condition: state
entity_id: binary_sensor.black_bed_occupied
state: 'on'
sequence:
- service: homeassistant.turn_on
entity_id: input_boolean.emmett_in_bed
- choose:
- conditions:
- condition: state
entity_id: input_boolean.bridget_home
state: 'on'
- condition: state
entity_id: input_boolean.bridget_in_bed
state: 'off'
- condition: state
entity_id: binary_sensor.white_bed_occupied
state: 'on'
sequence:
- service: homeassistant.turn_on
entity_id: input_boolean.bridget_in_bed
- choose:
- conditions:
- condition: state
entity_id: input_boolean.ebin_home
state: 'on'
- condition: state
entity_id: input_boolean.ebin_in_bed
state: 'off'
sequence:
- service: homeassistant.turn_on
entity_id: input_boolean.ebin_in_bed
- service: light.turn_on
data:
entity_id:
- light.black_bed_wled
- light.white_bed_wled
brightness_pct: 50
effect: random
- service: input_select.select_option
data:
entity_id: input_select.nursery_mode
option: 'Nightlight'
- delay: "00:15:00"
- service: input_select.select_option
data:
entity_id: input_select.nursery_mode
option: 'Off'
- service: input_boolean.turn_on
entity_id: input_boolean.nursery_light_cycle
#- service: input_select.select_option
# data:
# entity_id: input_select.google_home
# option: 'Nursery'
#- service: input_select.select_option
# data:
# entity_id: input_select.ambient_sound
# option: 'Random Kids Noise'
#- service: input_number.set_value
# data:
# entity_id: input_number.volume_ambientsounds
# value: '0.40'
#- service: script.ambientsounds
- delay: "00:30:00"
- service: input_boolean.turn_off
entity_id: input_boolean.nursery_light_cycle
- service: light.turn_off
data:
entity_id:
- light.black_bed_wled
- light.white_bed_wled
- service: input_select.select_option
data:
entity_id: input_select.nursery_mode
option: 'Off'
+86
View File
@@ -0,0 +1,86 @@
alias: Kids Asleep
id: automation_kids_asleep
mode: queued
trigger:
- platform: homeassistant
event: start
- platform: state
entity_id:
- input_boolean.emmett_is_awake
- input_boolean.bridget_is_awake
- input_boolean.ebin_is_awake
to: 'off'
- platform: state
entity_id: input_boolean.kids_away
to: 'on'
action:
- choose:
- conditions:
- condition: or
conditions:
- condition: and
conditions:
- condition: state
entity_id: input_boolean.emmett_is_awake
state: 'off'
- condition: state
entity_id: input_boolean.emmett_home
state: 'on'
- condition: and
conditions:
- condition: state
entity_id: input_boolean.bridget_is_awake
state: 'off'
- condition: state
entity_id: input_boolean.bridget_home
state: 'on'
- condition: and
conditions:
- condition: state
entity_id: input_boolean.ebin_is_awake
state: 'off'
- condition: state
entity_id: input_boolean.ebin_home
state: 'on'
sequence:
- service: input_boolean.turn_on
data:
entity_id: input_boolean.kids_asleep
- service: logbook.log
data_template:
name: Kids Asleep Asleep
entity_id: automation.kids_asleep
message: >
{% if trigger.entity_id == 'input_select.clint_status_dropdown' %}
input_select.clint_status_dropdown
{% elif trigger.entity_id == 'input_select.emmett_status_dropdown' %}
input_select.emmett_status_dropdown
{% elif trigger.entity_id == 'input_select.bridget_status_dropdown' %}
input_select.bridget_status_dropdown
{% elif trigger.entity_id == 'input_select.kristy_status_dropdown' %}
input_select.kristy_status_dropdown
{% elif trigger.entity_id == 'input_select.marshall_status_dropdown' %}
input_select.marshall_status_dropdown
{% elif trigger.entity_id == 'input_select.tess_status_dropdown' %}
input_select.tess_status_dropdown
{% elif trigger.entity_id == 'input_select.ebin_status_dropdown' %}
input_select.ebin_status_dropdown
{% else %}
input_select.guest_status_dropdown
{% endif %}
At least one of the kids is asleep. turning on kids_asleep
default:
- service: input_boolean.turn_off
data:
entity_id: input_boolean.kids_asleep
- service: logbook.log
data_template:
name: Kids Asleep
entity_id: automation.kids_asleep
message: >
None of the kids were asleep, defaulted to turning off kids_asleep
+216
View File
@@ -0,0 +1,216 @@
alias: Kids Awake
id: automation_kids_awake
mode: restart
trigger:
# Consider the kids awake if it is after 6:00AM and any of them that are home are also awake
- platform: state
entity_id:
- input_boolean.emmett_is_awake
- input_boolean.bridget_is_awake
- input_boolean.ebin_is_awake
- input_boolean.kids_away
- binary_sensor.morning
to: 'on'
- platform: state
entity_id:
- binary_sensor.black_bed_occupied
- binary_sensor.white_bed_occupied
to: 'off'
for: '00:05:00'
- platform: homeassistant
event: start
condition:
- alias: "Kids should only be considered awake if they get out of bed after 6:00 AM and before 7:00 PM"
condition: time
before: '19:00:00'
after: '06:00:00'
- alias: "Go through all the kids that are considered home and see if their bed is occupied"
condition: and
conditions:
- condition: or
conditions:
- condition: state
entity_id: input_boolean.emmett_home
state: 'off'
- condition: and
conditions:
- condition: state
entity_id: input_boolean.emmett_is_awake
state: 'off'
- condition: state
entity_id: input_boolean.emmett_home
state: 'on'
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.black_bed_occupied
state: 'off'
- condition: state
entity_id: binary_sensor.black_bed_occupied
state: 'unavailable'
- condition: or
conditions:
- condition: state
entity_id: input_boolean.bridget_home
state: 'off'
- condition: and
conditions:
- condition: state
entity_id: input_boolean.bridget_is_awake
state: 'off'
- condition: state
entity_id: input_boolean.bridget_home
state: 'on'
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.white_bed_occupied
state: 'off'
- condition: state
entity_id: binary_sensor.white_bed_occupied
state: 'unavailable'
- condition: or
conditions:
- condition: state
entity_id: input_boolean.ebin_home
state: 'off'
- condition: and
conditions:
- condition: state
entity_id: input_boolean.ebin_is_awake
state: 'off'
- condition: state
entity_id: input_boolean.ebin_home
state: 'on'
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.black_bed_occupied
state: 'off'
- condition: state
entity_id: binary_sensor.black_bed_occupied
state: 'unavailable'
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.white_bed_occupied
state: 'off'
- condition: state
entity_id: binary_sensor.white_bed_occupied
state: 'unavailable'
action:
- service: input_boolean.turn_off
entity_id:
- input_boolean.kids_bedtime
- input_boolean.kids_asleep
- choose:
- conditions:
- condition: state
entity_id: input_boolean.emmett_is_awake
state: 'off'
- condition: state
entity_id: input_boolean.emmett_home
state: 'on'
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.black_bed_occupied
state: 'off'
- condition: state
entity_id: binary_sensor.black_bed_occupied
state: 'unavailable'
sequence:
- service: input_boolean.turn_off
entity_id: input_boolean.emmett_in_bed
- service: input_boolean.turn_on
entity_id: input_boolean.emmett_is_awake
- choose:
- conditions:
- condition: state
entity_id: input_boolean.bridget_is_awake
state: 'off'
- condition: state
entity_id: input_boolean.bridget_home
state: 'on'
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.white_bed_occupied
state: 'off'
- condition: state
entity_id: binary_sensor.white_bed_occupied
state: 'unavailable'
sequence:
- service: input_boolean.turn_off
entity_id: input_boolean.bridget_in_bed
- service: input_boolean.turn_on
entity_id: input_boolean.bridget_is_awake
- choose:
- conditions:
- condition: state
entity_id: input_boolean.ebin_is_awake
state: 'off'
- condition: state
entity_id: input_boolean.ebin_home
state: 'on'
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.black_bed_occupied
state: 'off'
- condition: state
entity_id: binary_sensor.black_bed_occupied
state: 'unavailable'
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.white_bed_occupied
state: 'off'
- condition: state
entity_id: binary_sensor.white_bed_occupied
state: 'unavailable'
sequence:
- service: input_boolean.turn_off
entity_id: input_boolean.ebin_in_bed
- service: input_boolean.turn_on
entity_id: input_boolean.bridget_is_awake
- choose:
- conditions:
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.black_bed_occupied
state: 'off'
- condition: state
entity_id: binary_sensor.black_bed_occupied
state: 'unavailable'
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.white_bed_occupied
state: 'off'
- condition: state
entity_id: binary_sensor.white_bed_occupied
state: 'unavailable'
- condition: not
conditions:
- condition: state
entity_id: input_select.nursery_mode
state: 'Manual'
- condition: state
entity_id: input_select.house
state: 'Away'
sequence:
- service: input_select.select_option
data:
entity_id: input_select.nursery_mode
option: Auto
+26
View File
@@ -0,0 +1,26 @@
alias: Kids Away
id: automation_kids_away
mode: restart
trigger:
- platform: state
entity_id:
- input_boolean.emmett_home
- input_boolean.bridget_home
- input_boolean.ebin_home
to: 'off'
- platform: state
entity_id: binary_sensor.kids_at_home
to: 'off'
condition:
- condition: state
entity_id:
- input_boolean.emmett_home
- input_boolean.bridget_home
- input_boolean.ebin_home
- binary_sensor.kids_at_home
state: 'off'
action:
- service: input_boolean.turn_on
entity_id: input_boolean.kids_away
+116
View File
@@ -0,0 +1,116 @@
alias: Kids Away Videos On
id: automation_kids_away_videos_on
trigger:
- platform: state
entity_id: input_boolean.kids_away
from: 'off'
to: 'on'
condition:
- condition: or
conditions:
- condition: state
entity_id: media_player.front_room_tv
state: 'on'
- condition: state
entity_id: media_player.front_room_tv
state: 'playing'
- condition: or
conditions:
- condition: state
entity_id: media_player.front_room_tv
attribute: source
state: 'PBS Kids'
- condition: state
entity_id: media_player.front_room_tv
attribute: source
state: 'YouTube'
- condition: state
entity_id: media_player.front_room_hub
attribute: source
state: 'PBS Kids'
- condition: state
entity_id: media_player.front_room_hub
attribute: source
state: 'YouTube'
- condition: state
entity_id: media_player.master_bedroom_clock
attribute: source
state: 'PBS Kids'
- condition: state
entity_id: media_player.master_bedroom_clock
attribute: source
state: 'YouTube'
action:
- choose:
- conditions:
- condition: state
entity_id: media_player.front_room_tv
state: 'playing'
- condition: or
conditions:
- condition: state
entity_id: media_player.front_room_tv
attribute: source
state: 'YouTube'
- condition: state
entity_id: media_player.front_room_tv
attribute: source
state: 'PBS Kids'
sequence:
- service: media_player.select_source
data:
entity_id: media_player.front_room_tv
source: Home
- service: media_player.turn_off
data:
entity_id: media_player.front_room_tv
- choose:
- conditions:
- condition: state
entity_id: media_player.front_room_hub
state: 'playing'
- condition: or
conditions:
- condition: state
entity_id: media_player.front_room_hub
attribute: source
state: 'YouTube'
- condition: state
entity_id: media_player.front_room_hub
attribute: source
state: 'PBS Kids'
sequence:
- service: media_player.select_source
data:
entity_id: media_player.front_room_hub
source: Home
- service: media_player.turn_off
data:
entity_id: media_player.front_room_hub
- choose:
- conditions:
- condition: state
entity_id: media_player.master_bedroom_clock
state: 'playing'
- condition: or
conditions:
- condition: state
entity_id: media_player.master_bedroom_clock
attribute: source
state: 'YouTube'
- condition: state
entity_id: media_player.master_bedroom_clock
attribute: source
state: 'PBS Kids'
sequence:
- service: media_player.select_source
data:
entity_id: media_player.master_bedroom_clock
source: Home
- service: media_player.turn_off
data:
entity_id: media_player.master_bedroom_clock
+18
View File
@@ -0,0 +1,18 @@
alias: Kids Returned
id: automation_kids_returned
mode: restart
trigger:
- platform: state
entity_id:
- input_boolean.emmett_home
- input_boolean.bridget_home
- input_boolean.ebin_home
to: 'on'
condition:
- condition: state
entity_id: input_boolean.kids_away
state: 'on'
action:
- service: input_boolean.turn_off
entity_id: input_boolean.kids_away
+25
View File
@@ -0,0 +1,25 @@
alias: 'Nearly Home'
id: automation_nearly_home
initial_state: 'on'
trigger:
- platform: state
entity_id:
- binary_sensor.garage_door
- binary_sensor.front_door_contact
to: 'on'
condition:
- condition: state
entity_id: input_boolean.home_occupied
state: 'off'
for: '00:10:00'
- condition: numeric_state
entity_id: sensor.deck_light_level
below: 25
- condition: numeric_state
entity_id: sensor.sun_elevation
below: 15
action:
- service: input_select.select_option
data:
entity_id: input_select.entryway_mode
option: 'Auto'
@@ -0,0 +1,27 @@
alias: People Count Changed
id: automation_people_count_changed
mode: queued
trigger:
- platform: state
entity_id: sensor.people_count
- platform: homeassistant
event: start
action:
- choose:
- conditions:
- condition: state
entity_id: person.clint
state: 'home'
- condition: numeric_state
entity_id: sensor.people_count
above: 0
below: 2
sequence:
- service: homeassistant.turn_on
entity_id: input_boolean.clint_home_alone
default:
- service: homeassistant.turn_off
entity_id: input_boolean.clint_home_alone

Some files were not shown because too many files have changed in this diff Show More