From 1eec107e5b7b7016e07971df992f8289f2d66521 Mon Sep 17 00:00:00 2001 From: CCOSTAN Date: Sat, 11 Feb 2017 04:21:47 +0000 Subject: [PATCH] Updated code for when we are in bed. --- README.md | 43 ------------------------------- automation/good_night.yaml | 1 + automation/home_today.yaml | 2 +- automation/late_night_helper.yaml | 12 ++++++--- 4 files changed, 11 insertions(+), 47 deletions(-) diff --git a/README.md b/README.md index fd36b05e..7eb5cf23 100755 --- a/README.md +++ b/README.md @@ -100,48 +100,5 @@ SUNSET: I've moved this entire section to the [issues section](https://github.com/CCOSTAN/Home-AssistantConfig/issues) on github. -#Lab notes: - -```yaml - -Add codesend backup to RF Plugs! -@CCOSTAN I followed the info here: https://home-assistant.io/components/switch.command_line/ -command_on: "/var/www/html/rfoutlet/codesend 4543795 -l 177 -p 0" - -{%- if now().month in [01, 11, 12] -%} Yes {%- else -%} NO {%- endif %} - - - #Great Template Sensor Example -- platform: template - sensors: - front_door_lock_alarm_state: - value_template: > - '{{ - { - '21': 'Secured using Key or inside thumb-turn', - '22': 'Un-Secured using Key or inside thumb-turn', - '26': 'Auto Secured – Bolt Jammed', - '27': 'Auto Secured – Successful', - '17': 'Secured at Keypad – Bolt Jammed', - '18': 'Secured at Keypad – Successful', - '19': 'Un-Secured by User at Keypad', - '23': 'Secured by Controller – Bolt Jammed', - '24': 'Secured by Controller – Successful', - '25': 'Un-Secured by Controller – Successful', - '112': 'New User Code added to the lock', - '32': 'All User Codes deleted from lock', - '161': 'Failed User Code attempt at Keypad', - '162': 'Attempted access by user outside of schedule', - '167': 'Low battery level', - '168': 'Critical battery level', - '169': 'Battery level too low to operate lock' - }[states('sensor.kwikset_touchpad_electronic_deadbolt_alarm_type_26_0')] - }}' - friendly_name: 'Deadbolt Status:' - - - - -``` diff --git a/automation/good_night.yaml b/automation/good_night.yaml index 7e6d314e..6e97c1b3 100755 --- a/automation/good_night.yaml +++ b/automation/good_night.yaml @@ -38,5 +38,6 @@ "tuff your worries in your pillow, wrap your troubles in your blanket and spread your anxieties on your sheets. When you wake up tomorrow, you may have dirty linen, but more importantly, you’ll have a fresh mind and a happy heart. Good night." ] | random }} - service: script.interior_off + \ No newline at end of file diff --git a/automation/home_today.yaml b/automation/home_today.yaml index 625b3ca3..6edf5f59 100755 --- a/automation/home_today.yaml +++ b/automation/home_today.yaml @@ -15,7 +15,7 @@ - service: script.Voice_notify data_template: value1: > - "Welcome Home {{ trigger.entity_id.split('.')[1]|replace('_', ' ') }}. Here are the main points for today: + "Welcome Home {{ trigger.entity_id.split('.')[1]|replace('_', ' ') }}. Here is what's going on around the house right now: {%if now().strftime("%a") == 'Wed' or now().strftime("%a") == 'Sun'%} Today is {{now().strftime("%A")}} and {{now().strftime("%A")}} is garbage day. Please be sure to tell the kids to take out the trash. {%endif%} diff --git a/automation/late_night_helper.yaml b/automation/late_night_helper.yaml index cf20c98c..aee40d93 100755 --- a/automation/late_night_helper.yaml +++ b/automation/late_night_helper.yaml @@ -4,11 +4,16 @@ - alias: 'Late Night Helper' trigger: - platform: state - entity_id: binary_sensor.upstairs_away_mode + entity_id: + - binary_sensor.upstairs_away_mode + - binary_sensor.downstairs_away_mode state: 'off' - platform: state - entity_id: binary_sensor.downstairs_away_mode - state: 'off' + entity_id: + - binary_sensor.sleepnumber_carlo_carlo_is_in_bed + - binary_sensor.sleepnumber_carlo_stacey_is_in_bed + state: 'on' + for: '00:05:00' - platform: state entity_id: group.family state: home @@ -16,6 +21,7 @@ entity_id: group.garage_doors state: 'open' for: '00:01:30' + condition: condition: and