From 21fd53b05dae7b611ea99ef50cccc11ce671b1b2 Mon Sep 17 00:00:00 2001 From: Carlo Costanzo Date: Thu, 24 Sep 2015 15:56:26 -0400 Subject: [PATCH 1/3] Added some additional examples. - Added an eample of Groups within Groups. - Took away the Automation 2 and used the new -Alias format. - Added a second sensor to demonstrate sensor:, sensor 2: format. --- config/configuration.yaml.example | 50 +++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/config/configuration.yaml.example b/config/configuration.yaml.example index 44153c7876d..34185ff7847 100644 --- a/config/configuration.yaml.example +++ b/config/configuration.yaml.example @@ -70,11 +70,18 @@ device_sun_light_trigger: # A comma separated list of states that have to be tracked as a single group # Grouped states should share the same type of states (ON/OFF or HOME/NOT_HOME) +# You can also have groups within groups. group: + Home: + - group.living_room + - group.kitchen living_room: - light.Bowl - light.Ceiling - light.TV_back_light + kitchen: + - light.fan_bulb_1 + - light.fan_bulb_2 children: - device_tracker.child_1 - device_tracker.child_2 @@ -96,27 +103,23 @@ browser: keyboard: automation: + +- alias: Sun starts shining platform: state - alias: Sun starts shining - state_entity_id: sun.sun - # Next two are optional, omit to match all - state_from: below_horizon - state_to: above_horizon + state: 'above_horizon' - execute_service: light.turn_off - service_entity_id: group.living_room + service: light.turn_off + entity_id: group.living_room -automation 2: +- alias: 'Beer o Clock' platform: time - alias: Beer o Clock + hours: 16 + minutes: 0 + seconds: 0 - time_hours: 16 - time_minutes: 0 - time_seconds: 0 - - execute_service: notify.notify - service_data: + service: notify.notify + data: message: It's 4, time for beer! sensor: @@ -137,6 +140,23 @@ sensor: - type: 'process' arg: 'octave-cli' +sensor 2: + platform: forecast + api_key: + monitored_conditions: + - summary + - precip_type + - precip_intensity + - temperature + - dew_point + - wind_speed + - wind_bearing + - cloud_cover + - humidity + - pressure + - visibility + - ozone + script: # Turns on the bedroom lights and then the living room lights 1 minute later wakeup: From fa71d5fac9a9434dde33bb54af26ceda990b8342 Mon Sep 17 00:00:00 2001 From: Carlo Costanzo Date: Thu, 24 Sep 2015 15:57:23 -0400 Subject: [PATCH 2/3] Update configuration.yaml.example --- config/configuration.yaml.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/configuration.yaml.example b/config/configuration.yaml.example index 34185ff7847..c6309f521d3 100644 --- a/config/configuration.yaml.example +++ b/config/configuration.yaml.example @@ -104,7 +104,7 @@ keyboard: automation: -- alias: Sun starts shining +- alias: 'Sun starts shining' platform: state state_entity_id: sun.sun state: 'above_horizon' From 5f987051008d9f374545ce4582b5bf55a7a7d28c Mon Sep 17 00:00:00 2001 From: Carlo Costanzo Date: Fri, 25 Sep 2015 11:03:16 -0400 Subject: [PATCH 3/3] Changed the automation example Changed the automation example to match the examples on the website. --- config/configuration.yaml.example | 43 ++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/config/configuration.yaml.example b/config/configuration.yaml.example index c6309f521d3..381b0271016 100644 --- a/config/configuration.yaml.example +++ b/config/configuration.yaml.example @@ -103,24 +103,37 @@ browser: keyboard: automation: - -- alias: 'Sun starts shining' - platform: state - state_entity_id: sun.sun - state: 'above_horizon' +- alias: 'Rule 1 Light on in the evening' + trigger: + - platform: sun + event: sunset + offset: "-01:00:00" + - platform: state + entity_id: group.all_devices + state: home + condition: + - platform: state + entity_id: group.all_devices + state: home + - platform: time + after: "16:00:00" + before: "23:00:00" + action: + service: homeassistant.turn_on + entity_id: group.living_room - service: light.turn_off - entity_id: group.living_room +- alias: 'Rule 2 - Away Mode' -- alias: 'Beer o Clock' - platform: time - hours: 16 - minutes: 0 - seconds: 0 + trigger: + - platform: state + entity_id: group.all_devices + state: 'not_home' - service: notify.notify - data: - message: It's 4, time for beer! + condition: use_trigger_values + condition: + action: + service: light.turn_off + entity_id: group.all_lights sensor: platform: systemmonitor