Skip to content

Commit

Permalink
Change to IFTTT because lutron stopped working
Browse files Browse the repository at this point in the history
  • Loading branch information
GervaisdeM committed Apr 13, 2018
1 parent 28f80af commit 2c9b060
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 27 deletions.
74 changes: 59 additions & 15 deletions automations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,16 @@
- service: homeassistant.turn_off
entity_id: automation.timed_lights__movement_front_door
- service: light.turn_off
- service: ifttt.trigger
data: {"event":"caseta_lights_off"}
- service: input_boolean.turn_off
entity_id:
- input_boolean.bathroom
- input_boolean.kitchen_island
- input_boolean.kitchen_oven
- input_boolean.kitchen_table
- input_boolean.kitchen_window
- input_boolean.office_main_lights
- delay: ' 00:00:04'
- service: homeassistant.turn_on
entity_id: automation.timed_lights__movement_front_door
Expand All @@ -145,6 +155,16 @@
- service: homeassistant.turn_off
entity_id: automation.timed_lights__movement_front_door
- service: light.turn_off
- service: ifttt.trigger
data: {"event":"caseta_lights_off"}
- service: input_boolean.turn_off
entity_id:
- input_boolean.bathroom
- input_boolean.kitchen_island
- input_boolean.kitchen_oven
- input_boolean.kitchen_table
- input_boolean.kitchen_window
- input_boolean.office_main_lights
- delay: ' 00:00:04'
- service: homeassistant.turn_on
entity_id: automation.timed_lights__movement_front_door
Expand Down Expand Up @@ -186,6 +206,17 @@
- service: light.turn_off
- service: switch.turn_off
entity_id: switch.switch3
- service: light.turn_off
- service: ifttt.trigger
data: {"event":"caseta_lights_off"}
- service: input_boolean.turn_off
entity_id:
- input_boolean.bathroom
- input_boolean.kitchen_island
- input_boolean.kitchen_oven
- input_boolean.kitchen_table
- input_boolean.kitchen_window
- input_boolean.office_main_lights

- alias: 'Sunset - Lights on'
initial_state: true
Expand All @@ -194,12 +225,10 @@
event: sunset
offset: '-00:20:00'
action:
- service: light.turn_on
- service: input_boolean.turn_on
entity_id:
- light.bathroom
- light.kitchen_oven
data:
brightness: 255
- input_boolean.bathroom
- input_boolean.kitchen_oven
- service: light.turn_on
entity_id: group.outdoor_lights
data:
Expand Down Expand Up @@ -227,11 +256,8 @@
entity_id: group.office_lights
state: 'off'
action:
- service: light.turn_on
- service: homeassistant.turn_on
entity_id: group.office_lights
data:
brightness: 200
transition: 5
- service: switch.turn_on
entity_id: switch.switch3

Expand Down Expand Up @@ -404,13 +430,16 @@
- condition: template
value_template: '{{ distance(states.device_tracker.gervais_iphonetracks) > 10 }}'
action:
- service: light.turn_off
- service: ifttt.trigger
data: {"event":"caseta_lights_off"}
- service: input_boolean.turn_off
entity_id:
- light.bathroom
- group.kitchen_lights
- group.office_lights
data:
transition: 300
- input_boolean.bathroom
- input_boolean.kitchen_island
- input_boolean.kitchen_oven
- input_boolean.kitchen_table
- input_boolean.kitchen_window
- input_boolean.office_main_lights
- service: homeassistant.turn_on
entity_id: script.timer_livingroom_off
- service: switch.turn_off
Expand Down Expand Up @@ -500,6 +529,21 @@
- service: homeassistant.turn_on
entity_id: automation.timed_lights__movement_front_door

- alias: 'caseta lights'
initial_state: true
trigger:
- platform: state
entity_id:
- input_boolean.bathroom
- input_boolean.kitchen_island
- input_boolean.kitchen_oven
- input_boolean.kitchen_table
- input_boolean.kitchen_window
- input_boolean.office_main_lights
action:
service: ifttt.trigger
data_template: {"event": "{{ trigger.to_state.attributes.friendly_name }}_{{ trigger.to_state.state }}"}

- alias: 'Doorbell rang - pause tv'
initial_state: true
trigger:
Expand Down
35 changes: 29 additions & 6 deletions configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,12 @@ hue:
homekit:
pincode: !secret homekit_pincode

# Lutron Dimmers in Kitchen
lutron_caseta:
host: 192.168.2.121
keyfile: 'lutron/caseta.key'
certfile: 'lutron/caseta.crt'
ca_certs: 'lutron/caseta-bridge.crt'
## Lutron Dimmers in Kitchen
#lutron_caseta:
# host: 192.168.2.121
# keyfile: 'lutron/caseta.key'
# certfile: 'lutron/caseta.crt'
# ca_certs: 'lutron/caseta-bridge.crt'

# Enables support for tracking state changes over time.
history:
Expand Down Expand Up @@ -643,6 +643,29 @@ device_tracker:
Gervais3: iphone
Gail3: Gail-iPhone

# }}}
# {{{ Toggles

input_boolean:
bathroom:
name: bathroom
icon: mdi:lightbulb
kitchen_island:
name: kitchen_island
icon: mdi:lightbulb
kitchen_oven:
name: kitchen_oven
icon: mdi:lightbulb
kitchen_table:
name: kitchen_table
icon: mdi:lightbulb
kitchen_window:
name: kitchen_window
icon: mdi:lightbulb
office_main_lights:
name: office_main_lights
icon: mdi:lightbulb

# }}}
# {{{ Security Cams

Expand Down
12 changes: 6 additions & 6 deletions groups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,10 @@ bedroom_lights:
kitchen_lights:
name: Kitchen lights
entities:
- light.kitchen_island
- light.kitchen_oven
- light.kitchen_table
- light.kitchen_window
- input_boolean.kitchen_island
- input_boolean.kitchen_oven
- input_boolean.kitchen_table
- input_boolean.kitchen_window

livingroom_lights:
name: Livingroom lights
Expand All @@ -181,13 +181,13 @@ livingroom_lights:
misc_lights:
name: Misc lights
entities:
- light.bathroom
- input_boolean.bathroom
- light.computer_room

office_lights:
name: Office lights
entities:
- light.office_main_lights
- input_boolean.office_main_lights

outdoor_lights:
name: Outdoor lights
Expand Down

0 comments on commit 2c9b060

Please sign in to comment.