mirror of
https://github.com/skalavala/mysmarthome.git
synced 2025-08-27 14:57:19 +00:00
minor updates.
This commit is contained in:
@@ -209,10 +209,7 @@ automation:
|
||||
action:
|
||||
- condition: template
|
||||
value_template: "{{ states('input_boolean.notify_camera_alerts') == 'on' }}"
|
||||
- service: script.stream2chromecast
|
||||
data_template:
|
||||
url: !secret frontdoor_camera_stream_url
|
||||
name: "frontyard"
|
||||
- service: script.frontdoor_cam
|
||||
- condition: template
|
||||
value_template: "{{ states('alarm_control_panel.home') == 'armed_home' or states('alarm_control_panel.home') == 'armed_away' }}"
|
||||
- service: image_processing.scan
|
||||
@@ -845,10 +842,7 @@ automation:
|
||||
as_timestamp(states.input_label.current_stream.last_updated))
|
||||
| int > 15 }}"
|
||||
action:
|
||||
- service: script.stream2chromecast
|
||||
data_template:
|
||||
url: !secret frontdoor_camera_stream_url
|
||||
name: "frontyard"
|
||||
- service: script.frontdoor_cam
|
||||
|
||||
#
|
||||
# Every 15 minutes, change stream to alternate view with random cameras
|
||||
@@ -861,6 +855,12 @@ automation:
|
||||
- service_template: "script.{{- ['driveway', 'patio', 'playarea'] | random -}}_cam"
|
||||
|
||||
script:
|
||||
frontdoor_cam:
|
||||
sequence:
|
||||
- service: script.stream2chromecast
|
||||
data_template:
|
||||
url: !secret frontdoor_camera_stream_url
|
||||
name: "frontyard"
|
||||
driveway_cam:
|
||||
sequence:
|
||||
- service: script.stream2chromecast
|
||||
|
@@ -119,6 +119,16 @@ automation:
|
||||
payload: "off"
|
||||
retain: false
|
||||
|
||||
- alias: Turn Garage Lights On When Motion Detected
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.motion_sensor_158d000272bf48
|
||||
to: "on"
|
||||
action:
|
||||
- service: switch.turn_on
|
||||
entity_id: switch.garage
|
||||
|
||||
- alias: Kitchen Camera Motion Reset
|
||||
initial_state: true
|
||||
trigger:
|
||||
@@ -276,19 +286,21 @@ automation:
|
||||
action:
|
||||
- service: switch.turn_on
|
||||
entity_id: switch.front_room
|
||||
- service: script.frontdoor_cam
|
||||
|
||||
- alias: When Back Door Opens Turn Kitchen Lights ON
|
||||
initial_state: true
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: binary_sensor.back_door_sensor_sensor
|
||||
to: "on"
|
||||
- platform: state
|
||||
entity_id: binary_sensor.back_door_sensor_sensor
|
||||
to: "on"
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: "{{ states('sun.sun') == 'below_horizon' }}"
|
||||
action:
|
||||
- service: switch.turn_on
|
||||
entity_id: switch.kitchen
|
||||
- service_template: "script.{{ ['patio_cam', 'playarea_cam'] | random }}"
|
||||
|
||||
################################################################################
|
||||
# When I open the garage door
|
||||
|
@@ -237,6 +237,7 @@ automation:
|
||||
brightness: 10
|
||||
- service: timer.start
|
||||
entity_id: timer.timer_masterbedroom
|
||||
|
||||
# Master Bedroom:
|
||||
# Timer Elapsed - Turn OFF lights
|
||||
###############################################################################
|
||||
@@ -255,27 +256,29 @@ automation:
|
||||
- delay: "00:00:05"
|
||||
- service: light.turn_off
|
||||
entity_id: light.master_bedroom
|
||||
# Garage:
|
||||
# Motion Detected - Turn ON the light and extend timer
|
||||
#
|
||||
# Added a condition - if the lights were just turn off in the last 30 seconds,
|
||||
# do not turn ON the lights again
|
||||
###############################################################################
|
||||
- alias: Garage Motion & Timer
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.garage_motion
|
||||
from: "off"
|
||||
to: "on"
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: "{{ states('input_boolean.working_in_garage') | lower == 'on' }}"
|
||||
- condition: template
|
||||
value_template: "{{ (as_timestamp(now()) - as_timestamp(states.switch.garage.last_updated)) | int > 30 }}"
|
||||
action:
|
||||
- service: switch.turn_on
|
||||
entity_id: switch.garage
|
||||
|
||||
# # Garage:
|
||||
# # Motion Detected - Turn ON the light and extend timer
|
||||
# #
|
||||
# # Added a condition - if the lights were just turn off in the last 30 seconds,
|
||||
# # do not turn ON the lights again
|
||||
# ###############################################################################
|
||||
# - alias: Garage Motion & Timer
|
||||
# initial_state: true
|
||||
# trigger:
|
||||
# - platform: state
|
||||
# entity_id: binary_sensor.garage_motion
|
||||
# from: "off"
|
||||
# to: "on"
|
||||
# condition:
|
||||
# - condition: template
|
||||
# value_template: "{{ states('input_boolean.working_in_garage') | lower == 'on' }}"
|
||||
# - condition: template
|
||||
# value_template: "{{ (as_timestamp(now()) - as_timestamp(states.switch.garage.last_updated)) | int > 30 }}"
|
||||
# action:
|
||||
# - service: switch.turn_on
|
||||
# entity_id: switch.garage
|
||||
|
||||
# Start the timer when the lights are ON
|
||||
###############################################################################
|
||||
- alias: Garage Timer Start When Garage Lights ON
|
||||
@@ -288,6 +291,7 @@ automation:
|
||||
action:
|
||||
- service: timer.start
|
||||
entity_id: timer.timer_garage
|
||||
|
||||
# Garage:
|
||||
# Timer Elapsed - Turn OFF lights, when "I am not working"
|
||||
###############################################################################
|
||||
|
Reference in New Issue
Block a user