Update Nest automations to go local.

This commit is contained in:
CCOSTAN
2016-10-13 16:07:27 +00:00
parent 57ad45d197
commit 47f4801fca
3 changed files with 42 additions and 4 deletions

19
Todo.md
View File

@@ -5,6 +5,25 @@
* Put Dash Buttons out there. * Put Dash Buttons out there.
* Put door sensor on garage door * Put door sensor on garage door
binary_sensor:
- platform: template
sensors:
upstairs_away_mode:
entity_id: climate.upstairs
value_template: "{{ is_state_attr('climate.upstairs', 'away_mode', 'on') }}"
automation:
- alias: Trigger When Away
trigger:
- platform: state
entity_id: binary_sensor.upstairs_away_mode
to: 'on'
condition:
...
action:
...
### Future Ideas ### Future Ideas

View File

@@ -1,15 +1,20 @@
# Uses the Nest thermostat to turn on lights and turn them off. # Uses the Nest thermostat to turn on lights and turn them off upstairs.
- alias: 'Upstairs Light Turn on' - alias: 'Upstairs Light Turn on'
trigger: trigger:
- platform: event - platform: event
event_type: upstairs_light_on event_type: upstairs_light_on
- platform: state
entity_id: binary_sensor.upstairs_away_mode
to: 'off'
condition: condition:
condition: state - condition: state
entity_id: sun.sun entity_id: sun.sun
state: 'below_horizon' state: 'below_horizon'
- condition: time
before: '23:45'
action: action:
service: light.turn_on service: light.turn_on
entity_id: group.upstairs entity_id: group.upstairs
@@ -18,7 +23,10 @@
trigger: trigger:
- platform: event - platform: event
event_type: upstairs_light_off event_type: upstairs_light_off
- platform: state
entity_id: binary_sensor.upstairs_away_mode
to: 'on'
action: action:
service: light.turn_off service: light.turn_off
entity_id: group.upstairs entity_id: group.upstairs

11
sensor/nest.yaml Executable file
View File

@@ -0,0 +1,11 @@
- platform: template
sensors:
upstairs_away_mode:
entity_id: climate.upstairs
value_template: "{{ is_state_attr('climate.upstairs', 'away_mode', 'on') }}"
- platform: template
sensors:
upstairs_away_mode:
entity_id: climate.downstairs
value_template: "{{ is_state_attr('climate.downstairs', 'away_mode', 'on') }}"