diff --git a/automation/lights.yaml b/automation/lights.yaml index 6fd1ae3..10f545e 100644 --- a/automation/lights.yaml +++ b/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' @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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' diff --git a/automation/notifications.yaml b/automation/notifications.yaml index 43e5462..85ba9b3 100644 --- a/automation/notifications.yaml +++ b/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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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_ @@ -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 @@ -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 diff --git a/automation/plex.yaml b/automation/plex.yaml index 1f7259b..5af61b6 100644 --- a/automation/plex.yaml +++ b/automation/plex.yaml @@ -1,14 +1,17 @@ #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 @@ -16,18 +19,19 @@ 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 \ No newline at end of file + entity_id: light.lightstrip + effect: Slowdown \ No newline at end of file diff --git a/automation/security.yaml b/automation/security.yaml index c38b396..0c2a7ac 100644 --- a/automation/security.yaml +++ b/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 @@ -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' @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/cameras.yaml b/cameras.yaml index d0b4a84..43f54d9 100644 --- a/cameras.yaml +++ b/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 diff --git a/configuration.yaml b/configuration.yaml index e4717fb..c791315 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -35,18 +35,20 @@ config: frontend: logbook: updater: +hassio: #sun: -discovery: +#discovery: history: panel_iframe: !include panels.yaml switch: !include switches.yaml sensor: !include sensors.yaml group: !include groups.yaml automation: !include_dir_merge_list automation/ -camera: !include cameras.yaml +amcrest: !include cameras.yaml script: !include scripts.yaml zwave: usb_path: /dev/ttyUSB0 + new_entity_ids: true recorder: purge_days: 3 climate: @@ -56,12 +58,12 @@ logger: logs: homeassistant.components.switch.template: fatal homeassistant.components.sensor.template: error -ffmpeg: - ffmpeg_bin: /usr/bin/ffmpeg +camera: + platform: amcrest zha: usb_path: /dev/ttyUSB1 - database_path: /home/homeassistant/.homeassistant/zigbee.db + database_path: /config/zigbee.db notify: platform: pushover @@ -88,7 +90,6 @@ lutron_caseta: device_tracker: platform: asuswrt host: 192.168.1.1 - protocol: telnet username: admin password: !secret common_password track_new_devices: no @@ -112,7 +113,7 @@ media_player: use_custom_entity_ids: false use_episode_art: true - platform: spotify - client_id: 64ab0f70ea9643678e552bdbd98fd765 + client_id: !secret spotify_id client_secret: !secret spotify_secret - platform: cast host: 192.168.1.12 @@ -132,4 +133,12 @@ input_boolean: initial: on cloud_timer: name: Cloud Timer - initial: off \ No newline at end of file + initial: off + +light: + - platform: yeelight + devices: + 192.168.1.21: + name: Lightstrip + transition: 1000 + use_music_mode: True \ No newline at end of file diff --git a/groups.yaml b/groups.yaml index c4caeb3..aafb6d2 100644 --- a/groups.yaml +++ b/groups.yaml @@ -9,6 +9,7 @@ - light.kitchen_light - light.living_room_light - light.garage_light + - light.lightstrip InsideLights: name: Inside Lights @@ -18,6 +19,7 @@ - light.kitchen_light - light.living_room_light - light.hallway_light + - light.lightstrip Automation: name: Automation @@ -42,6 +44,7 @@ - sensor.hallway_motion - sensor.garage_motion - sensor.kitchen_motion + - sensor.porch_motion Cameras: name: Cameras @@ -55,9 +58,9 @@ name: Media Players entities: - media_player.scottsplex + - sensor.plex - media_player.spotify - media_player.scotts_chromecast - - media_player.yamaha_receiver System: name: System @@ -100,12 +103,14 @@ entities: - group.alllights - group.doors - - device_tracker.Scott - - device_tracker.Gabe - - device_tracker.Kaleb + - device_tracker.scott + - device_tracker.gabe + - device_tracker.mathia - updater.updater - group.motionsensors - switch.noise_machine + - switch.vacuum + - sensor.hass_update_available CameraView: name: Cameras diff --git a/panels.yaml b/panels.yaml index 7db25bf..9850099 100644 --- a/panels.yaml +++ b/panels.yaml @@ -18,4 +18,7 @@ nzbget: plexpy: title: 'PlexPy' icon: mdi:database - url: 'http://REDACTED.duckdns.org:8181' \ No newline at end of file + url: 'http://REDACTED.duckdns.org:8181' +trakt: + title: 'Trakt' + url: 'http://trakt-for-plex.github.io/configuration' \ No newline at end of file diff --git a/plex.conf b/plex.conf new file mode 100644 index 0000000..59f86de --- /dev/null +++ b/plex.conf @@ -0,0 +1 @@ +{"192.168.1.2:32400": {"token": null, "ssl": false, "verify": true}} \ No newline at end of file diff --git a/scripts.yaml b/scripts.yaml index 6d634f8..9c2d0e5 100644 --- a/scripts.yaml +++ b/scripts.yaml @@ -43,15 +43,26 @@ data: entity_id: media_player.spotify source: Bedroom Dot + - service: media_player.play_media + data: + entity_id: media_player.spotify + media_content_id: spotify:user:spotify:playlist:37i9dQZEVXcUMSdfp9xj29 + media_content_type: playlist - service: media_player.shuffle_set data: entity_id: media_player.spotify shuffle: true - - service: media_player.play_media + - service: media_player.media_next_track data: entity_id: media_player.spotify - media_content_id: spotify:user:saltyjavvie1:playlist:1Y5GrrPQMNuBKhulyx5Bfq - media_content_type: playlist - - service: media_player.media_next_track + lightstrip_plex: + sequence: + - service: light.turn_on + data: + entity_id: light.lightstrip + rgb_color: [255,255,255] + brightness: 3 + - service: light.turn_on data: - entity_id: media_player.spotify \ No newline at end of file + entity_id: light.lightstrip + color_temp: 154 \ No newline at end of file diff --git a/sensors.yaml b/sensors.yaml index a336a59..7a50006 100644 --- a/sensors.yaml +++ b/sensors.yaml @@ -1,8 +1,13 @@ #Sensors +- platform: plex + host: 192.168.1.2 + username: !secret plex_user + password: !secret plex_pass + - platform: darksky - api_key: REDACTED - latitude: REDACTED - longitude: REDACTED + api_key: 433e7bcdee176830d6af6a63bca5dcf6 + latitude: 35.1166232 + longitude: -85.1380908 monitored_conditions: - precip_intensity diff --git a/switches.yaml b/switches.yaml index 485cb84..cb0bc02 100644 --- a/switches.yaml +++ b/switches.yaml @@ -36,4 +36,9 @@ entity_id: switch.bedroom_receptacle_switch turn_off: service: switch.turn_off - entity_id: switch.bedroom_receptacle_switch \ No newline at end of file + entity_id: switch.bedroom_receptacle_switch + +- platform: xiaomi_vacuum + name: 'Vacuum' + host: 192.168.1.22 + token: !secret vacuum_token \ No newline at end of file