From 92b14d9d4f177db1c22e1e6c72f21cdbee89297e Mon Sep 17 00:00:00 2001 From: CCOSTAN Date: Tue, 8 Nov 2016 19:04:57 +0000 Subject: [PATCH] Fancy Template on TEMPLATE ACTION. --- README.md | 5 ++--- automation/time_5am_8am.yaml | 6 ++++++ automation/time_8am_8pm.yaml | 8 +++++--- automation/time_8pm_5am.yaml | 8 +++++--- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index f6932371..73bc4829 100755 --- a/README.md +++ b/README.md @@ -4,14 +4,14 @@ This is my Home Assistant Configuration created with the All In One installer. I update it pretty regularly. Home Assistant runs on my [Raspberry Pi 3](http://amzn.to/2e3DOBY) with [Aeon Labs Z Wave Stick (GEN 5)](http://amzn.to/2eAiAP0). I've also added a [433Mhz Transmitter and receiver](http://amzn.to/2dceNY2) -Software on the Pi : [Home Assistant](https://home-assistant.io/) , [Dasher](https://github.com/maddox/dasher), [HomeBridge](https://github.com/nfarina/homebridge) +Software on the Pi : [Home Assistant](https://home-assistant.io/) , [Dasher](https://github.com/maddox/dasher), SSL via SSLS.com - 5 Bucks A Year! **Devices I have :** * Lots of iOS Devices (iPads, iPods, iPhones) * [Nest Thermostats](http://amzn.to/2eAhB1k) * [Amazon Echo](http://amzn.to/2dSVbK4) and [DOT](http://amzn.to/2e3vHFQ) * [Amazon Dash Buttons](http://amzn.to/2dPKZhM) -* [Phillips Hue Hub](http://amzn.to/2eoQTJy) +* [Phillips Hue Hub Gen 2](http://amzn.to/2eoQTJy) * [Circle by Disney](http://amzn.to/2eAgaA6) * [Rachio Sprinkler system](http://amzn.to/2eoPKBW) * [SkyBell HD](http://amzn.to/2dcexIB) @@ -50,7 +50,6 @@ Software on the Pi : [Home Assistant](https://home-assistant.io/) , [Dasher](htt * Put door sensor on garage door ([Garadget](garadget.com) is on the way!) * Put Door Sensor in Mailbox * Add Pi-Hole (Ad blocking) to the network with the Pi Zero. (Add to Home Assistant) -* Add LetsEncrypt and [CertBot](https://certbot.eff.org/#debianjessie-other) for auto renewals. (or buy cheapo SSL cert) for advanced Alexa stuff. * Flash backyard lights when doorbell rings. * Bedside dash button for morning, night and bathroom trips. * Create various scenes (early morning, breakfast, work, entertaining, ) diff --git a/automation/time_5am_8am.yaml b/automation/time_5am_8am.yaml index a797bccf..90ed9b67 100755 --- a/automation/time_5am_8am.yaml +++ b/automation/time_5am_8am.yaml @@ -12,6 +12,12 @@ before: '7:59:00' - condition: template value_template: "{{ trigger.event.data.entity_id.split('.')[0] == 'light' }}" + - condition: template + value_template: "{{ trigger.event.data.entity_id.split('_')[0] != 'light.tv' }}" + - condition: template + value_template: "{{ trigger.event.data.entity_id.split('_')[0] != 'light.couch' }}" + - condition: template + value_template: "{{ trigger.event.data.entity_id.split('_')[0] != 'light.outdoor' }}" - condition: template value_template: "{{ trigger.event.data.new_state.state == 'on' }}" - condition: template diff --git a/automation/time_8am_8pm.yaml b/automation/time_8am_8pm.yaml index 89f1339c..41875678 100755 --- a/automation/time_8am_8pm.yaml +++ b/automation/time_8am_8pm.yaml @@ -11,11 +11,13 @@ - condition: time before: '20:00:00' - condition: template - value_template: "{{ trigger.event.data.entity_id.split('.')[1] != 'tv_light' }}" + value_template: "{{ trigger.event.data.entity_id.split('.')[0] == 'light' }}" - condition: template - value_template: "{{ trigger.event.data.entity_id.split('.')[1] != 'tv_stand_light' }}" + value_template: "{{ trigger.event.data.entity_id.split('_')[0] != 'light.tv' }}" - condition: template - value_template: "{{ trigger.event.data.entity_id.split('.')[0] == 'light' }}" + value_template: "{{ trigger.event.data.entity_id.split('_')[0] != 'light.couch' }}" + - condition: template + value_template: "{{ trigger.event.data.entity_id.split('_')[0] != 'light.outdoor' }}" - condition: template value_template: "{{ trigger.event.data.new_state.state == 'on' }}" - condition: template diff --git a/automation/time_8pm_5am.yaml b/automation/time_8pm_5am.yaml index ac31b9ae..f497985a 100755 --- a/automation/time_8pm_5am.yaml +++ b/automation/time_8pm_5am.yaml @@ -18,11 +18,13 @@ entity_id: group.family state: home - condition: template - value_template: "{{ trigger.event.data.entity_id.split('.')[1] != 'tv_light' }}" + value_template: "{{ trigger.event.data.entity_id.split('.')[0] == 'light' }}" - condition: template - value_template: "{{ trigger.event.data.entity_id.split('.')[1] != 'tv_stand_light' }}" + value_template: "{{ trigger.event.data.entity_id.split('_')[0] != 'light.tv' }}" - condition: template - value_template: "{{ trigger.event.data.entity_id.split('.')[0] == 'light' }}" + value_template: "{{ trigger.event.data.entity_id.split('_')[0] != 'light.couch' }}" + - condition: template + value_template: "{{ trigger.event.data.entity_id.split('_')[0] != 'light.outdoor' }}" - condition: template value_template: "{{ trigger.event.data.new_state.state == 'on' }}" - condition: template