Merge branch 'current' into next
Conflicts: Gemfile.lock
This commit is contained in:
commit
e73ce3766d
38 changed files with 335 additions and 961 deletions
|
@ -61,7 +61,7 @@ Alrighty, it's time for Home Assistant 0.10. A lot amazing things have changed a
|
|||
|
||||
This release introduces templates. This will allow you to parse data before it gets processed or create messages for notifications on the fly based on data within Home Assistant. The notification component and the new Alexa/Amazon Echo component are both using the new template functionality to render responses. A template editor has been added to the developer tool section in the app so you can get instant feedback if your templates are working or not.
|
||||
|
||||
```jinja2
|
||||
```text
|
||||
The temperature at home is {% raw %}{{ states('sensor.temperature') }}{% endraw %}.
|
||||
```
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ If you park your car and go shopping - *device_tracker.beacon_car* will stop mov
|
|||
|
||||
With the basic tracking working - you can use automation to do things like open your gates if your car comes home
|
||||
|
||||
````yaml
|
||||
```yaml
|
||||
automation:
|
||||
- alias: 'Open gate'
|
||||
trigger:
|
||||
|
@ -73,19 +73,19 @@ automation:
|
|||
action:
|
||||
service: switch.turn_on
|
||||
entity_id: switch.gate
|
||||
````
|
||||
```
|
||||
|
||||
Or warn you if you leave your keys behind
|
||||
|
||||
````yaml
|
||||
```yaml
|
||||
automation:
|
||||
- alias: 'Forgotten keys'
|
||||
trigger:
|
||||
platform: template
|
||||
value_template: {% raw %}'{{states.device_tracker.greg_gregphone.state != states.device_tracker.beacon_keys.state}}'{% endraw %}
|
||||
value_template: '{% raw %}{{ states.device_tracker.greg_gregphone.state != states.device_tracker.beacon_keys.state}}{% endraw %}'
|
||||
condition:
|
||||
condition: template
|
||||
value_template: {% raw %}'{{ states.device_tracker.greg_gregphone.state != "home" }}'{% endraw %}
|
||||
value_template: '{% raw %}{{ states.device_tracker.greg_gregphone.state != "home" }}{% endraw %}'
|
||||
action:
|
||||
service: script.turn_on
|
||||
entity_id: script.send_key_alert
|
||||
|
@ -93,7 +93,7 @@ automation:
|
|||
- alias: 'Forgotten keys - cancel'
|
||||
trigger:
|
||||
platform: template
|
||||
value_template: {% raw %}'{{states.device_tracker.greg_gregphone.state == states.device_tracker.beacon_keys.state}}'{% endraw %}
|
||||
value_template: '{% raw %}{{ states.device_tracker.greg_gregphone.state == states.device_tracker.beacon_keys.state }}{% endraw %}'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: script.send_key_alert
|
||||
|
@ -101,9 +101,9 @@ automation:
|
|||
action:
|
||||
service: script.turn_off
|
||||
entity_id: script.send_key_alert
|
||||
````
|
||||
```
|
||||
|
||||
````yaml
|
||||
```yaml
|
||||
script:
|
||||
send_key_alert:
|
||||
sequence:
|
||||
|
@ -113,7 +113,7 @@ script:
|
|||
data:
|
||||
message: 'You forgot your keys'
|
||||
target: 'device/gregs_iphone'
|
||||
````
|
||||
```
|
||||
|
||||
|
||||
(The delay is needed for two reasons: -
|
||||
|
|
|
@ -56,13 +56,12 @@ class OutsideLights(appapi.AppDaemon):
|
|||
def initialize(self):
|
||||
self.run_at_sunrise(self.sunrise_cb, 0)
|
||||
self.run_at_sunset(self.sunset_cb, 0)
|
||||
|
||||
|
||||
def sunrise_cb(self, args, kwargs):
|
||||
self.turn_on(self.args["off_scene"])
|
||||
|
||||
def sunset_cb(self, args, kwargs):
|
||||
self.turn_on(self.args["on_scene"])
|
||||
|
||||
```
|
||||
|
||||
This is also fairly easy to achieve with Home Assistant automations, but we are just getting started.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue