diff --git a/logging.yaml b/logging.yaml index 53c22e4..dd4d15a 100644 --- a/logging.yaml +++ b/logging.yaml @@ -10,6 +10,7 @@ logs: simplipy.api: warning netdisco.ssdp: warning aiohttp.server: warning + aiohttp.websocket: error homeassistant.core: critical homeassistant.setup: warning homeassistant.loader: warning # hide custom_component warnings diff --git a/packages/batteries.yaml b/packages/batteries.yaml index 4638736..cfeee2d 100644 --- a/packages/batteries.yaml +++ b/packages/batteries.yaml @@ -403,6 +403,9 @@ automation: - service: script.voice_notify data_template: message: "{{ trigger.to_state.attributes.friendly_name.split(' ')[1] }}'s phone battery is : {{ trigger.to_state.attributes.battery }}%." + - service: script.led_message + data_template: + message: "{{ trigger.to_state.attributes.friendly_name.split(' ')[1] }}'s phone battery is : {{ trigger.to_state.attributes.battery }}%." - alias: Alert Low Battery trigger: @@ -419,12 +422,16 @@ automation: - service: script.voice_notify data_template: message: > - {% set ns = namespace(lowBattery) %} + {% set ns = namespace(lowBattery="") %} {%- for x in states if x.attributes and x.attributes.battery_level and x.attributes.battery_level |int <= 24 %} + {%- if loop.first %}The {% elif loop.last %} and the {% else %}, the {% endif -%} {% set ns.lowBattery = ns.lowBattery ~ ',' ~ x.name %} {%- endfor %} {{ ns.lowBattery -}} - {{- ' battery is ' if ns.lowBattery.split(',')|count == 1 else ' batteries are ' -}} less than 25 percent. + {{- ' battery is ' if ns.lowBattery.split(',')|count == 2 else ' batteries are ' -}} less than 25 percent. + - service: script.led_message + data_template: + message: "{{ trigger.to_state.attributes.friendly_name.split(' ')[1] }}'s phone battery is : {{ trigger.to_state.attributes.battery }}%." # ############################################################################### # # Automation: Notify of Sensor's Low Battery diff --git a/packages/cameras.yaml b/packages/cameras.yaml index af2221c..f8daf14 100644 --- a/packages/cameras.yaml +++ b/packages/cameras.yaml @@ -849,3 +849,16 @@ automation: data_template: url: !secret frontdoor_camera_stream_url name: "frontyard" + + # + # Every 15 minutes, change stream to alternate view + # + - alias: Reset Stream On Chromecast + trigger: + - platform: time_pattern + minutes: "/15" + action: + - service: script.stream2chromecast + data_template: + url: !secret driveway_camera_stream_url + name: "driveway" diff --git a/packages/door_sensors.yaml b/packages/door_sensors.yaml index 69cdf6b..38b26ef 100644 --- a/packages/door_sensors.yaml +++ b/packages/door_sensors.yaml @@ -1,4 +1,23 @@ homeassistant: + customize: + package.door_sensors: + door_notification_script: &door_notification_script + message: > + {% set doors = "" %} + {% if states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') == "on" and + states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == "on" %} + {% set doors = "Attention! Both Garage Doors are OPEN" %} + {% elif states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') == "off" and + states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == "off" %} + {% set doors = "Both Garage Doors are now CLOSED" %} + {% else %} + {% if trigger.to_state.state | lower == "on" %} + Attention! Your {{ trigger.to_state.attributes.friendly_name }} is now OPENED! + {% elif trigger.to_state.state | lower == "off" %} + Your {{ trigger.to_state.attributes.friendly_name }} is now CLOSED! + {% endif %} + {% endif %} + {{ doors }} sensor: - platform: template @@ -158,24 +177,12 @@ automation: {% elif trigger.to_state.state | lower == "off" %} {{ trigger.to_state.attributes.friendly_name }} is now CLOSED! {% endif %} + - service: script.led_message + data_template: + <<: *door_notification_script - service: script.voice_notify data_template: - message: > - {% set doors = "" %} - {% if states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') == "on" and - states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == "on" %} - {% set doors = "Attention! Both Garage Doors are OPEN" %} - {% elif states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') == "off" and - states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == "off" %} - {% set doors = "Both Garage Doors are now CLOSED" %} - {% else %} - {% if trigger.to_state.state | lower == "on" %} - Attention! Your {{ trigger.to_state.attributes.friendly_name }} is now OPENED! - {% elif trigger.to_state.state | lower == "off" %} - Your {{ trigger.to_state.attributes.friendly_name }} is now CLOSED! - {% endif %} - {% endif %} - {{ doors }} + <<: *door_notification_script - delay: "00:00:05" - service: camera.snapshot data_template: @@ -248,6 +255,14 @@ automation: {% else %} yes {% endif %} + - service: script.led_message + data_template: + message: > + {% if trigger.to_state.state | lower == "on" %} + Your {{ trigger.to_state.attributes.friendly_name.replace('Sensor', '') -}} is OPEN. + {% else %} + Your {{ trigger.to_state.attributes.friendly_name.replace('Sensor', '') -}} is CLOSED. + {% endif %} - alias: When Front Door Opens Turn Front Room Lights ON initial_state: true diff --git a/packages/homesecurity.yaml b/packages/homesecurity.yaml index 9415d33..f102b3c 100644 --- a/packages/homesecurity.yaml +++ b/packages/homesecurity.yaml @@ -118,7 +118,7 @@ automation: - condition: template value_template: "{{ states('alarm_control_panel.home') != 'disarmed' }}" - service: input_boolean.turn_on - entity_id: input_boolean.notify_camera_motion + entity_id: input_boolean.notify_camera_alerts ############################################################################### # A gentle 10 minute reminder that the Home Security system is OFF diff --git a/packages/scripts.yaml b/packages/scripts.yaml index 990b9ee..e46b1fe 100644 --- a/packages/scripts.yaml +++ b/packages/scripts.yaml @@ -67,7 +67,7 @@ script: sequence: - service: script.all_indoor_lights_off - service: input_boolean.turn_on - entity_id: input_boolean.notify_camera_motion + entity_id: input_boolean.notify_camera_alerts - service: climate.set_away_mode data: entity_id: climate.dining_room @@ -426,8 +426,7 @@ script: - service: mqtt.publish data_template: topic: messageboard/messages - payload: > - { 'message': '{{ message }}','frameDelay': 50 } + payload: "{{ message }}" ############################################################################### # Notifies to take pills, starts timer again! diff --git a/packages/watchdog.yaml b/packages/watchdog.yaml index 580ab6b..d988fd6 100644 --- a/packages/watchdog.yaml +++ b/packages/watchdog.yaml @@ -35,13 +35,14 @@ automation: entity_id: input_boolean.working_in_garage # Garage: - # Keeps and eye on the garage door... reminds me to close after 5 min + # Keeps and eye on the garage doors... reminds me to close after 5 min ############################################################################### - - alias: Single Car garage Door WatchDog + - alias: Two Car garage Door WatchDog initial_state: true trigger: - platform: state entity_id: + - binary_sensor.two_car_garage_door_tilt_sensor_sensor - binary_sensor.single_car_garage_door_tilt_sensor_sensor to: "on" for: @@ -54,46 +55,27 @@ automation: value_template: "{{ states('input_boolean.garage_door_notifications') == 'on' }}" action: - service: script.notify_me - data: - message: "Single Car Garage Door is OPEN for more than 5 minutes!" + data_template: + message: > + Your {{ trigger.to_state.attributes.friendly_name }} is OPEN for more than 5 minutes! - service: script.voice_notify data_template: - message: "Attention! Your single car garage door is open for more than 5 minutes." + message: > + Attention! Your {{ trigger.to_state.attributes.friendly_name }} is open for more than 5 minutes. + - service: scipt.led_notify + data_template: + message: > + Your {{ trigger.to_state.attributes.friendly_name }} is OPEN for more than 5 minutes! - # Garage: - # Keeps and eye on the garage door... reminds me to close after 5 min + # Outdoor Lights: + # Keeps and eye on the patio and backyard lights... ############################################################################### - - alias: Two Car garage Door WatchDog - initial_state: true - trigger: - - platform: state - entity_id: - - binary_sensor.two_car_garage_door_tilt_sensor_sensor - to: "on" - for: - minutes: 5 - condition: - - condition: state - entity_id: input_boolean.working_in_garage - state: "off" - - condition: template - value_template: "{{ states('input_boolean.garage_door_notifications') == 'on' }}" - action: - - service: script.notify_me - data: - message: "Your Two Car Garage Door is OPEN for more than 5 minutes!" - - service: script.voice_notify - data_template: - message: "Attention! Your two car garage door is open for more than 5 minutes." - - # Front Yard: - # Keeps and eye on the front porch lights... - ############################################################################### - - alias: Frontyard Light WatchDog + - alias: Outdoor Light WatchDog initial_state: true trigger: - platform: state entity_id: + - switch.wemobackyardlightswitch - switch.frontyard_light to: "on" for: @@ -111,78 +93,46 @@ automation: message: > {{ trigger.to_state.attributes.friendly_name }} is ON during the day time. Saving power by turning it off! - # Back Yard: - # Keeps and eye on the patio lights... + # General Watch Dog automation: + # Keeps and eye on the lights & switches, turns off after 10 PM if they are on. ############################################################################### - - alias: Backyard Light WatchDog - initial_state: true - trigger: - - platform: state - entity_id: - - switch.wemobackyardlightswitch - to: "on" - for: - minutes: 5 - condition: - - condition: state - entity_id: sun.sun - state: "above_horizon" - action: - - service: switch.turn_off - data_template: - entity_id: "{{ trigger.entity_id }}" - - service: script.notify_me - data_template: - message: > - {{ trigger.to_state.attributes.friendly_name }} is ON during the day time. Saving power by turning it off! - - # Guest Bedroom: - # Keeps and eye on the Guest Bedroom 1 lights... - ############################################################################### - - alias: Guest Bedroom 1 Light WatchDog + - alias: Lights And Switches WatchDog initial_state: true trigger: - platform: state entity_id: + - switch.basement_left + - switch.basement_right + - switch.bathroom_fragrance + - switch.downstairs_fragrance + - switch.front_room + - switch.garage - switch.guest_bedroom - to: "on" - for: - minutes: 15 - action: - - service: switch.turn_off - data_template: - entity_id: "{{ trigger.entity_id }}" - - # Guest Bedroom 2: - # Keeps and eye on the Guest Bedroom 2 lights... - ############################################################################### - - alias: Guest Bedroom 2 Light WatchDog - initial_state: true - trigger: - - platform: state - entity_id: - - switch.prayer_room - to: "on" - for: - minutes: 10 - action: - - service: switch.turn_off - data_template: - entity_id: "{{ trigger.entity_id }}" - - # Kids Bedroom: - # Keeps and eye on the Kids Bedroom lights... - ############################################################################### - - alias: Kids Bedroom Light WatchDog - initial_state: true - trigger: - - platform: state - entity_id: + - switch.kids_bed_accent - switch.kids_bedroom + - switch.kitchen + - switch.office_room + - switch.prayer_room + - switch.upstairs_fragrance + - switch.wemoswitch1 + - switch.zwave_smart_switch_switch + - light.family_room + - light.family_room_2 + - light.gateway_light_34ce008ad65d + - light.hue_color_lamp_1 + - light.hue_color_lamp_2 + - light.hue_color_lamp_3 + - light.master_bedroom + - light.master_bedroom_1 + - light.master_bedroom_2 + - light.master_bedroom_3 to: "on" for: minutes: 10 + condition: + - condition: template + value_template: "{{ now().hour |int > 22 }}" action: - - service: switch.turn_off + - service: homeassistant.turn_off data_template: entity_id: "{{ trigger.entity_id }}" diff --git a/zwcfg_0xd89c4f0c.xml b/zwcfg_0xd89c4f0c.xml index 3944292..31ffdc6 100644 --- a/zwcfg_0xd89c4f0c.xml +++ b/zwcfg_0xd89c4f0c.xml @@ -34,10 +34,10 @@ - + - + @@ -168,7 +168,7 @@ - + @@ -216,9 +216,9 @@ - + - + @@ -350,7 +350,7 @@ - + @@ -379,7 +379,7 @@ - + @@ -490,7 +490,7 @@ - + @@ -601,7 +601,7 @@ - + @@ -710,7 +710,7 @@ - + @@ -728,9 +728,9 @@ - - - + + + @@ -1006,11 +1006,11 @@ - - - + + + - + @@ -1181,7 +1181,7 @@ - + @@ -1190,8 +1190,8 @@ - - + + @@ -1328,7 +1328,7 @@ - + @@ -1703,7 +1703,7 @@ - + @@ -1714,7 +1714,7 @@ - + @@ -1734,7 +1734,7 @@ - + @@ -2023,7 +2023,7 @@ - + @@ -2038,7 +2038,7 @@ - + @@ -2132,7 +2132,7 @@ - + @@ -2248,7 +2248,7 @@ - + @@ -2262,9 +2262,9 @@ - + - + @@ -2437,7 +2437,7 @@ - +