Skip to content

Commit

Permalink
Change to HassIO
Browse files Browse the repository at this point in the history
  • Loading branch information
scottocs11 committed Jul 26, 2017
1 parent c59f8e9 commit 168e25a
Show file tree
Hide file tree
Showing 12 changed files with 150 additions and 71 deletions.
45 changes: 34 additions & 11 deletions automation/lights.yaml
@@ -1,5 +1,6 @@
#Lights Automation
- alias: Bedroom Light on and Noise Machine off at 7am
- id: 7amBedroom
alias: Bedroom Light on and Noise Machine off at 7am
trigger:
platform: time
at: '07:00:00'
Expand All @@ -22,7 +23,21 @@
action:
service: script.morning_alarm

- alias: Garage Lights On When Door Opens
- id: LightstripOffAtMidnight
alias: Lightstrip off at midnight if Plex idle
trigger:
platform: time
at: '00:00:01'
condition:
condition: state
entity_id: media_player.scottsplex
state: 'idle'
action:
service: light.turn_off
entity_id: light.lightstrip

- id: GarageLightsOnWhenDoorOpens
alias: Garage Lights On When Door Opens
trigger:
platform: state
entity_id: sensor.central_door, cover.garage_door
Expand All @@ -37,7 +52,8 @@
data:
brightness: 255

- alias: Garage Light On With Motion
- id: GarageLightOnWithMotion
alias: Garage Light On With Motion
trigger:
platform: state
entity_id: sensor.garage_motion
Expand All @@ -52,7 +68,8 @@
data:
brightness: 255

- alias: Garage Light Off at 5 Minutes
- id: GarageLightOffAfter5Mins
alias: Garage Light Off after 5 Minutes
trigger:
platform: state
entity_id: sensor.garage_motion
Expand All @@ -67,7 +84,8 @@
service: homeassistant.turn_off
entity_id: light.garage_light

- alias: Hallway Light On At Night With Motion
- id: HallwayLightOnWithMotion-Night
alias: Hallway Light On At Night With Motion
trigger:
platform: state
entity_id: sensor.hallway_motion
Expand All @@ -87,7 +105,8 @@
data:
brightness: 50

- alias: Hallway Light On During The Day With Motion
- id: HallwayLightOnWithMotion-Day
alias: Hallway Light On During The Day With Motion
trigger:
platform: state
entity_id: sensor.hallway_motion
Expand All @@ -107,7 +126,8 @@
data:
brightness: 255

- alias: Hallway Light Off at No Motion
- id: HallwayLightOffNoMotion
alias: Hallway Light Off after No Motion
trigger:
platform: state
entity_id: sensor.hallway_motion
Expand All @@ -122,7 +142,8 @@
service: homeassistant.turn_off
entity_id: light.hallway_light

- alias: Kitchen Light On With Motion
- id: KitchenLightOnWithMotion
alias: Kitchen Light On With Motion
trigger:
platform: state
entity_id: sensor.kitchen_motion
Expand All @@ -133,11 +154,12 @@
state: 'off'
action:
service: homeassistant.turn_on
entity_id: light.kitchen_light, light.dining_light
entity_id: light.kitchen_light
data:
brightness: 255

- alias: Coming Home Lights On
- id: ComingHomeLightsOn
alias: Coming Home Lights On
trigger:
platform: state
entity_id: sensor.front_door, sensor.central_door
Expand All @@ -154,7 +176,8 @@
- service: input_boolean.turn_on
entity_id: input_boolean.entry_lights

- alias: Reset Morning Lights Boolean 5am
- id: ResetMorningLightsBoolean5am
alias: Reset Morning Lights Boolean 5am
trigger:
platform: time
at: '05:00:00'
Expand Down
30 changes: 20 additions & 10 deletions automation/notifications.yaml
@@ -1,5 +1,6 @@
#Notifications Automation
- alias: Notify When Door Opens If No One Is Home
- id: NotifyWhenDoorOpens
alias: Notify When Door Opens If No One Is Home
trigger:
platform: state
entity_id: sensor.kitchen_door, sensor.central_door, sensor.front_door, sensor.back_garage_door, cover.garage_door
Expand All @@ -14,7 +15,8 @@
message: >
{{ trigger.to_state.attributes.friendly_name }} Opened
- alias: Notify when Cloud is at back door
- id: NotifyWhenCloudIsHome
alias: Notify when Cloud is at back door
trigger:
platform: state
entity_id: sensor.porch_motion
Expand All @@ -35,7 +37,8 @@
- service: input_boolean.turn_on
entity_id: input_boolean.cloud_timer

- alias: Reset Cloud Timer at 5 Minutes
- id: ResetCloudTimerAfter5Mins
alias: Reset Cloud Timer after 5 Minutes
trigger:
platform: state
entity_id: sensor.porch_motion
Expand All @@ -46,7 +49,8 @@
service: input_boolean.turn_off
entity_id: input_boolean.cloud_timer

- alias: Notify When Smoke Detector Detects Smoke
- id: NotifyWhenSmokeDetectorDetectsSmoke
alias: Notify When Smoke Detector Detects Smoke
trigger:
platform: state
entity_id: sensor.kitchen_smoke_detector, sensor.garage_smoke_detector, sensor.hallway_smoke_detector
Expand All @@ -57,7 +61,8 @@
message: >
{{ trigger.to_state.attributes.friendly_name }} Smoke Detected
- alias: Notify When Smoke Detector Detects Carbon Monoxide
- id: NotifyWhenSmokeDetectorDetectsCarbon
alias: Notify When Smoke Detector Detects Carbon Monoxide
trigger:
platform: state
entity_id: sensor.kitchen_smoke_detector, sensor.garage_smoke_detector, sensor.hallway_smoke_detector
Expand All @@ -68,7 +73,8 @@
message: >
{{ trigger.to_state.attributes.friendly_name }} Carbon Monoxide Detected
- alias: Notify When Garage Is Open at 10pm
- id: NotifyWhenGarageIsOpenAfter10PM
alias: Notify When Garage Is Open after 10pm
trigger:
platform: state
entity_id: cover.garage_door
Expand All @@ -82,7 +88,8 @@
data:
message: "Garage Door is still open."

- alias: Notify When Garage Is Open For 30 minutes
- id: NotifyWhenGarageIsOpenFor30Mins
alias: Notify When Garage Is Open For 30 minutes
trigger:
platform: state
entity_id: cover.garage_door
Expand All @@ -94,7 +101,8 @@
data:
message: "Garage Door has been open 30 minutes."

- alias: Notify When Disk Use is >95%
- id: NotifyWhenDiskUseis95
alias: Notify When Disk Use is >95%
trigger:
platform: numeric_state
entity_id: sensor.disk_use_
Expand All @@ -104,7 +112,8 @@
data:
message: "HASS disk use is 95% full."

- alias: Notify When Home-Assistant Has An Update
- id: NotifyWhenUpdateAvailable
alias: Notify When Home-Assistant Has An Update
trigger:
- platform: state
entity_id: updater.updater
Expand All @@ -113,7 +122,8 @@
data:
message: "Home-Assistant has an update."

- alias: Notify When Smoke Detector Battery Low
- id: NotifyWhenSmokeDetectorBatteryLow
alias: Notify When Smoke Detector Battery Low
trigger:
platform: numeric_state
entity_id: sensor.kitchen_smoke_detector_battery, sensor.hallway_smoke_detector_battery, sensor.garage_smoke_detector_battery, sensor.thermostat_battery
Expand Down
24 changes: 14 additions & 10 deletions automation/plex.yaml
@@ -1,33 +1,37 @@
#Plex Automation
- alias: Plex Playing
- id: PlexPlaying
alias: Plex Playing
trigger:
- platform: state
entity_id: media_player.scottsplex
to: 'playing'
action:
service: homeassistant.turn_off
- service: homeassistant.turn_off
entity_id: light.living_room_light, light.dining_light, light.hallway_light
- service: script.lightstrip_plex

- alias: Plex Paused
- id: PlexPaused
alias: Plex Paused
trigger:
- platform: state
entity_id: media_player.scottsplex
to: 'paused'
for:
seconds: 5
action:
service: homeassistant.turn_on
entity_id: light.living_room_light
- service: light.turn_on
data:
brightness: 50
entity_id: light.lightstrip
effect: Slowdown

- alias: Plex Stopped
- id: PlexStopped
alias: Plex Stopped
trigger:
- platform: state
entity_id: media_player.scottsplex
to: 'idle'
action:
service: homeassistant.turn_on
entity_id: light.living_room_light
- service: light.turn_on
data:
brightness: 50
entity_id: light.lightstrip
effect: Slowdown
25 changes: 16 additions & 9 deletions automation/security.yaml
@@ -1,5 +1,6 @@
#Security Automation
- alias: Morning Automation
- id: MorningAutomation
alias: Morning Automation
trigger:
platform: state
entity_id: sensor.hallway_motion
Expand All @@ -21,7 +22,8 @@
entity_id: input_boolean.morning_lights
- service: script.inside_cameras_off

- alias: Inside Cameras And Door Notifications On At Midnight
- id: InsideCamerasAndDoorNotificationsOnAtMidnight
alias: Inside Cameras And Door Notifications On At Midnight
trigger:
platform: time
at: '00:00:01'
Expand All @@ -30,7 +32,8 @@
- service: input_boolean.turn_on
entity_id: input_boolean.door_notifications

- alias: Actions When Everyone Leaves
- id: ActionsWhenEveryoneLeaves
alias: Actions When Everyone Leaves
trigger:
platform: state
entity_id: group.all_devices
Expand All @@ -46,10 +49,11 @@
- service: input_boolean.turn_on
entity_id: input_boolean.door_notifications

- alias: Inside Cameras Off When Someone Arrives Home
- id: InsideCamerasOffWhenSomeoneArrivesHome
alias: Inside Cameras Off When Someone Arrives Home
trigger:
platform: state
entity_id: device_tracker.scott, device_tracker.gabe, device_tracker.marvin
entity_id: device_tracker.scott, device_tracker.gabe, device_tracker.mathia
to: 'home'
condition:
condition: and
Expand All @@ -65,10 +69,11 @@
- service: input_boolean.turn_off
entity_id: input_boolean.door_notifications

- alias: Door Notifications Off When Someone Arrives Home
- id: DoorNotificationsOffWhenSomeoneArrivesHome
alias: Door Notifications Off When Someone Arrives Home
trigger:
platform: state
entity_id: device_tracker.scott, device_tracker.gabe, device_tracker.marvin
entity_id: device_tracker.scott, device_tracker.gabe, device_tracker.mathia
to: 'home'
condition:
condition: and
Expand All @@ -83,7 +88,8 @@
- service: input_boolean.turn_off
entity_id: input_boolean.door_notifications

- alias: Outside Cameras On When Stops Raining
- id: OutsideCamerasOnWhenStopsRaining
alias: Outside Cameras On When Stops Raining
trigger:
platform: state
entity_id: sensor.dark_sky_precip_intensity
Expand All @@ -102,7 +108,8 @@
action:
- service: script.outside_inside_cameras_on

- alias: Outside Cameras Off When Starts Raining
- id: OutsideCamerasOffWhenStartsRaining
alias: Outside Cameras Off When Starts Raining
trigger:
platform: state
entity_id: sensor.dark_sky_precip_intensity
Expand Down
14 changes: 5 additions & 9 deletions cameras.yaml
@@ -1,27 +1,23 @@
#Cameras
- platform: amcrest
host: 192.168.1.7
#Amcrest Cameras
- host: 192.168.1.7
username: admin
password: !secret common_password
stream_source: snapshot
name: Living Room

- platform: amcrest
host: 192.168.1.8
- host: 192.168.1.8
username: admin
password: !secret common_password
stream_source: snapshot
name: Garage

- platform: amcrest
host: 192.168.1.9
- host: 192.168.1.9
username: admin
password: !secret common_password
stream_source: snapshot
name: Back Yard

- platform: amcrest
host: 192.168.1.10
- host: 192.168.1.10
username: admin
password: !secret common_password
stream_source: snapshot
Expand Down

0 comments on commit 168e25a

Please sign in to comment.