diff --git a/atom.xml b/atom.xml
index 113ecab421..44aba88ea2 100644
--- a/atom.xml
+++ b/atom.xml
@@ -4,7 +4,7 @@
- 2016-11-19T10:33:06+00:00
+ 2016-11-19T23:39:26+00:00
https://home-assistant.io/
diff --git a/blog/categories/community/atom.xml b/blog/categories/community/atom.xml
index 98f2f58bc1..3cbea58846 100644
--- a/blog/categories/community/atom.xml
+++ b/blog/categories/community/atom.xml
@@ -4,7 +4,7 @@
- 2016-11-19T10:33:06+00:00
+ 2016-11-19T23:39:26+00:00
https://home-assistant.io/
diff --git a/blog/categories/device-tracking/atom.xml b/blog/categories/device-tracking/atom.xml
index 495ce2f082..c8a8a39060 100644
--- a/blog/categories/device-tracking/atom.xml
+++ b/blog/categories/device-tracking/atom.xml
@@ -4,7 +4,7 @@
- 2016-11-19T10:33:06+00:00
+ 2016-11-19T23:39:26+00:00
https://home-assistant.io/
diff --git a/blog/categories/esp8266/atom.xml b/blog/categories/esp8266/atom.xml
index 8d091115b9..367611b579 100644
--- a/blog/categories/esp8266/atom.xml
+++ b/blog/categories/esp8266/atom.xml
@@ -4,7 +4,7 @@
- 2016-11-19T10:33:06+00:00
+ 2016-11-19T23:39:26+00:00
https://home-assistant.io/
diff --git a/blog/categories/how-to/atom.xml b/blog/categories/how-to/atom.xml
index 481ff2480c..7e55a0d8c8 100644
--- a/blog/categories/how-to/atom.xml
+++ b/blog/categories/how-to/atom.xml
@@ -4,7 +4,7 @@
- 2016-11-19T10:33:06+00:00
+ 2016-11-19T23:39:26+00:00
https://home-assistant.io/
diff --git a/blog/categories/ibeacons/atom.xml b/blog/categories/ibeacons/atom.xml
index 4b009403e7..32a192d204 100644
--- a/blog/categories/ibeacons/atom.xml
+++ b/blog/categories/ibeacons/atom.xml
@@ -4,7 +4,7 @@
- 2016-11-19T10:33:06+00:00
+ 2016-11-19T23:39:26+00:00
https://home-assistant.io/
diff --git a/blog/categories/internet-of-things/atom.xml b/blog/categories/internet-of-things/atom.xml
index c8912e2b27..7e5bef274b 100644
--- a/blog/categories/internet-of-things/atom.xml
+++ b/blog/categories/internet-of-things/atom.xml
@@ -4,7 +4,7 @@
- 2016-11-19T10:33:06+00:00
+ 2016-11-19T23:39:26+00:00
https://home-assistant.io/
diff --git a/blog/categories/iot-data/atom.xml b/blog/categories/iot-data/atom.xml
index f8ef193bb5..8063ef1a44 100644
--- a/blog/categories/iot-data/atom.xml
+++ b/blog/categories/iot-data/atom.xml
@@ -4,7 +4,7 @@
- 2016-11-19T10:33:06+00:00
+ 2016-11-19T23:39:26+00:00
https://home-assistant.io/
diff --git a/blog/categories/micropython/atom.xml b/blog/categories/micropython/atom.xml
index 26fa0f176c..9829fd0a6e 100644
--- a/blog/categories/micropython/atom.xml
+++ b/blog/categories/micropython/atom.xml
@@ -4,7 +4,7 @@
- 2016-11-19T10:33:06+00:00
+ 2016-11-19T23:39:26+00:00
https://home-assistant.io/
diff --git a/blog/categories/mqtt/atom.xml b/blog/categories/mqtt/atom.xml
index 025f922fd2..e7a2b253e6 100644
--- a/blog/categories/mqtt/atom.xml
+++ b/blog/categories/mqtt/atom.xml
@@ -4,7 +4,7 @@
- 2016-11-19T10:33:06+00:00
+ 2016-11-19T23:39:26+00:00
https://home-assistant.io/
diff --git a/blog/categories/organisation/atom.xml b/blog/categories/organisation/atom.xml
index 9aa34e4e59..d065333a83 100644
--- a/blog/categories/organisation/atom.xml
+++ b/blog/categories/organisation/atom.xml
@@ -4,7 +4,7 @@
- 2016-11-19T10:33:06+00:00
+ 2016-11-19T23:39:26+00:00
https://home-assistant.io/
diff --git a/blog/categories/owntracks/atom.xml b/blog/categories/owntracks/atom.xml
index 9d0fc87a04..1899680af3 100644
--- a/blog/categories/owntracks/atom.xml
+++ b/blog/categories/owntracks/atom.xml
@@ -4,7 +4,7 @@
- 2016-11-19T10:33:06+00:00
+ 2016-11-19T23:39:26+00:00
https://home-assistant.io/
diff --git a/blog/categories/presence-detection/atom.xml b/blog/categories/presence-detection/atom.xml
index b72e15ca8a..8602d13178 100644
--- a/blog/categories/presence-detection/atom.xml
+++ b/blog/categories/presence-detection/atom.xml
@@ -4,7 +4,7 @@
- 2016-11-19T10:33:06+00:00
+ 2016-11-19T23:39:26+00:00
https://home-assistant.io/
diff --git a/blog/categories/public-service-announcement/atom.xml b/blog/categories/public-service-announcement/atom.xml
index 3916a61354..8da0f36aed 100644
--- a/blog/categories/public-service-announcement/atom.xml
+++ b/blog/categories/public-service-announcement/atom.xml
@@ -4,7 +4,7 @@
- 2016-11-19T10:33:06+00:00
+ 2016-11-19T23:39:26+00:00
https://home-assistant.io/
diff --git a/blog/categories/release-notes/atom.xml b/blog/categories/release-notes/atom.xml
index 0fd988d9e2..ee3d715530 100644
--- a/blog/categories/release-notes/atom.xml
+++ b/blog/categories/release-notes/atom.xml
@@ -4,7 +4,7 @@
- 2016-11-19T10:33:06+00:00
+ 2016-11-19T23:39:26+00:00
https://home-assistant.io/
diff --git a/blog/categories/survey/atom.xml b/blog/categories/survey/atom.xml
index e399c38b13..167de0484c 100644
--- a/blog/categories/survey/atom.xml
+++ b/blog/categories/survey/atom.xml
@@ -4,7 +4,7 @@
- 2016-11-19T10:33:06+00:00
+ 2016-11-19T23:39:26+00:00
https://home-assistant.io/
diff --git a/blog/categories/talks/atom.xml b/blog/categories/talks/atom.xml
index 0056dae3d7..d2c512bfd0 100644
--- a/blog/categories/talks/atom.xml
+++ b/blog/categories/talks/atom.xml
@@ -4,7 +4,7 @@
- 2016-11-19T10:33:06+00:00
+ 2016-11-19T23:39:26+00:00
https://home-assistant.io/
diff --git a/blog/categories/technology/atom.xml b/blog/categories/technology/atom.xml
index 1bb7023d4e..3c8fd64af9 100644
--- a/blog/categories/technology/atom.xml
+++ b/blog/categories/technology/atom.xml
@@ -4,7 +4,7 @@
- 2016-11-19T10:33:06+00:00
+ 2016-11-19T23:39:26+00:00
https://home-assistant.io/
diff --git a/blog/categories/user-stories/atom.xml b/blog/categories/user-stories/atom.xml
index 16aba62934..0e658fea9f 100644
--- a/blog/categories/user-stories/atom.xml
+++ b/blog/categories/user-stories/atom.xml
@@ -4,7 +4,7 @@
- 2016-11-19T10:33:06+00:00
+ 2016-11-19T23:39:26+00:00
https://home-assistant.io/
diff --git a/blog/categories/video/atom.xml b/blog/categories/video/atom.xml
index 07428124b9..6efa95c5c2 100644
--- a/blog/categories/video/atom.xml
+++ b/blog/categories/video/atom.xml
@@ -4,7 +4,7 @@
- 2016-11-19T10:33:06+00:00
+ 2016-11-19T23:39:26+00:00
https://home-assistant.io/
diff --git a/blog/categories/website/atom.xml b/blog/categories/website/atom.xml
index 94d0b0a28f..197d37b39e 100644
--- a/blog/categories/website/atom.xml
+++ b/blog/categories/website/atom.xml
@@ -4,7 +4,7 @@
- 2016-11-19T10:33:06+00:00
+ 2016-11-19T23:39:26+00:00
https://home-assistant.io/
diff --git a/cookbook/automation_enocean_phue/index.html b/cookbook/automation_enocean_phue/index.html
index c44c9423ee..651cdf85e3 100644
--- a/cookbook/automation_enocean_phue/index.html
+++ b/cookbook/automation_enocean_phue/index.html
@@ -163,6 +163,9 @@
Examples for flashing lights
+
+ Examples using first light
+
Examples using the sun
diff --git a/cookbook/automation_first_light/index.html b/cookbook/automation_first_light/index.html
new file mode 100644
index 0000000000..7985d27fad
--- /dev/null
+++ b/cookbook/automation_first_light/index.html
@@ -0,0 +1,305 @@
+
+
+
+
+
+
+
+
+
+ Examples using first light - Home Assistant
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Examples Using First Light
+
+
+
+
+
+ #### Create an input_boolean in your configuration.yaml
+
+```yaml
+input_boolean:
+ trigger_first_morning:
+ name: Waiting for first morning motion
+ icon: mdi:kettle
+```
+
+#### The Main Automation
+
+```yaml
+## These first two control t input_boolean that allows the "first morning action" to occur
+## If the action is triggered, it will also disable this boolean. This assumes you have the sun platform enabled.
+
+automation:
+#turns it on at 5am
+ - alias: Enable First Morning Trigger
+ trigger:
+ - platform: time
+ after: '5:00'
+ action:
+ service: homeassistant.turn_on
+ entity_id: input_boolean.trigger_first_morning
+
+# turns it off an hour after sunrise
+ - alias: Disable First Morning Trigger
+ trigger:
+ - platform: sun
+ event: sunrise
+ offset: "01:00:00"
+ action:
+ service: homeassistant.turn_off
+ entity_id: input_boolean.trigger_first_morning
+
+
+
+# This is the main automation. It triggers when my motion sensor is triggered
+# (in this case, a motion sensor from a security system attached to my Vera)
+ - alias: First Morning Motion
+ trigger:
+ platform: state
+ entity_id: binary_sensor.livingroom_motion
+ to: 'on'
+ # only complete the automation if we're still waiting for the first motion
+ condition:
+ condition: state
+ entity_id: input_boolean.trigger_first_morning
+ state: 'on'
+
+ action:
+ # turn off the "waiting" boolean regardless of whether lights will turn on
+ # so that this happens only once
+ - service: homeassistant.turn_off
+ entity_id: input_boolean.trigger_first_morning
+
+ # But only turn on lights if the living room and kitchen lights are off or dimmed
+ # If a condition tests false, the automation will end
+ - condition: and
+ conditions:
+ - condition: numeric_state
+ entity_id: light.livingroom_ec
+ # if light is off, force a 0, otherwise use the brightness value
+ value_template: '{% if states.light.livingroom_ec.state == "on" %}{{ states.light.livingroom_ec.attributes.brightness }}{% else %}0{% endif %}'
+ # brightness below 50% (255 = 100%)
+ below: 127
+ - condition: numeric_state
+ entity_id: light.kitchen_bar
+ value_template: '{% if states.light.kitchen_bar.state == "on" %}{{ states.light.kitchen_bar.attributes.brightness }}{% else %}0{% endif %}'
+ below: 127
+ - condition: numeric_state
+ entity_id: light.kitchen_ceiling
+ value_template: '{% if states.light.kitchen_ceiling.state == "on" %}{{ states.light.kitchen_ceiling.attributes.brightness }}{% else %}0{% endif %}'
+ below: 127
+
+ # Trigger a scene
+ # You could add as many services or scenes as you'd like
+ - service: scene.turn_on
+ entity_id: scene.morning_first_motion
+
+
+```
+
+#### The Scene
+
+Here is the Scene that is called via the Automations above.
+
+```yaml
+# here's the scene that gets called. Lights in
+# my living room and kitchen turn on.
+scene:
+ - name: Morning First Motion
+ entities:
+ light.kitchen_ceiling:
+ state: on
+ brightness: 127
+ light.kitchen_bar:
+ state: on
+ brightness: 178
+ light.kitchen_above_cabinet:
+ state: on
+ brightness: 178
+ light.livingroom_ec:
+ state: on
+ brightness: 153
+ light.livingroom_track:
+ state: on
+ brightness: 153
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cookbook/automation_flashing_lights/index.html b/cookbook/automation_flashing_lights/index.html
index 4148fd2ba5..150b2d5756 100644
--- a/cookbook/automation_flashing_lights/index.html
+++ b/cookbook/automation_flashing_lights/index.html
@@ -215,6 +215,9 @@
Examples for flashing lights
+
+ Examples using first light
+
Examples using the sun
diff --git a/cookbook/automation_for_rainy_days/index.html b/cookbook/automation_for_rainy_days/index.html
index bfa296cd98..890950a3eb 100644
--- a/cookbook/automation_for_rainy_days/index.html
+++ b/cookbook/automation_for_rainy_days/index.html
@@ -164,6 +164,9 @@
Examples for flashing lights
+
+ Examples using first light
+
Examples using the sun
diff --git a/cookbook/automation_sun/index.html b/cookbook/automation_sun/index.html
index ae71109710..5d9b6fdc9b 100644
--- a/cookbook/automation_sun/index.html
+++ b/cookbook/automation_sun/index.html
@@ -215,6 +215,9 @@
Examples for flashing lights
+
+ Examples using first light
+
Examples using the sun
diff --git a/cookbook/automation_using_timeinterval_inputboolean/index.html b/cookbook/automation_using_timeinterval_inputboolean/index.html
index 266a0f4ee7..c048748aa4 100644
--- a/cookbook/automation_using_timeinterval_inputboolean/index.html
+++ b/cookbook/automation_using_timeinterval_inputboolean/index.html
@@ -149,6 +149,9 @@
Examples for flashing lights
+
+ Examples using first light
+
Examples using the sun
diff --git a/cookbook/dim_lights_when_playing_media/index.html b/cookbook/dim_lights_when_playing_media/index.html
index d1abdc423c..48f87e1369 100644
--- a/cookbook/dim_lights_when_playing_media/index.html
+++ b/cookbook/dim_lights_when_playing_media/index.html
@@ -186,6 +186,9 @@
Examples for flashing lights
+
+ Examples using first light
+
Examples using the sun
diff --git a/cookbook/foscam_away_mode_PTZ/index.html b/cookbook/foscam_away_mode_PTZ/index.html
index d7444df59c..b4e7ad66c5 100644
--- a/cookbook/foscam_away_mode_PTZ/index.html
+++ b/cookbook/foscam_away_mode_PTZ/index.html
@@ -191,6 +191,9 @@ The following outlines examples of the switch, services, and scripts required to
Examples for flashing lights
+
+ Examples using first light
+
Examples using the sun
diff --git a/cookbook/index.html b/cookbook/index.html
index d94c6e4978..875a62d4b5 100644
--- a/cookbook/index.html
+++ b/cookbook/index.html
@@ -106,6 +106,9 @@
Examples for flashing lights
+
+ Examples using first light
+
Examples using the sun
diff --git a/cookbook/notify_if__new_ha_release/index.html b/cookbook/notify_if__new_ha_release/index.html
index c6ba060d69..c903ed9da3 100644
--- a/cookbook/notify_if__new_ha_release/index.html
+++ b/cookbook/notify_if__new_ha_release/index.html
@@ -161,6 +161,9 @@
Examples for flashing lights
+
+ Examples using first light
+
Examples using the sun
diff --git a/cookbook/notify_if_over_threshold/index.html b/cookbook/notify_if_over_threshold/index.html
index 1c4472daaa..de83e9c18a 100644
--- a/cookbook/notify_if_over_threshold/index.html
+++ b/cookbook/notify_if_over_threshold/index.html
@@ -155,6 +155,9 @@
Examples for flashing lights
+
+ Examples using first light
+
Examples using the sun
diff --git a/cookbook/perform_actions_based_on_input_select/index.html b/cookbook/perform_actions_based_on_input_select/index.html
index 5a772f916c..87ebc876d8 100644
--- a/cookbook/perform_actions_based_on_input_select/index.html
+++ b/cookbook/perform_actions_based_on_input_select/index.html
@@ -277,6 +277,9 @@
Examples for flashing lights
+
+ Examples using first light
+
Examples using the sun
diff --git a/cookbook/restart_ha_if_wemo_switch_is_not_detected/index.html b/cookbook/restart_ha_if_wemo_switch_is_not_detected/index.html
index a7df42cfa7..c8566afe41 100644
--- a/cookbook/restart_ha_if_wemo_switch_is_not_detected/index.html
+++ b/cookbook/restart_ha_if_wemo_switch_is_not_detected/index.html
@@ -205,6 +205,9 @@
Examples for flashing lights
+
+ Examples using first light
+
Examples using the sun
diff --git a/cookbook/send_a_reminder/index.html b/cookbook/send_a_reminder/index.html
index 068228db18..35c4b79bb7 100644
--- a/cookbook/send_a_reminder/index.html
+++ b/cookbook/send_a_reminder/index.html
@@ -148,6 +148,9 @@
Examples for flashing lights
+
+ Examples using first light
+
Examples using the sun
diff --git a/cookbook/track_battery_level/index.html b/cookbook/track_battery_level/index.html
index d0005629d0..24afd9fdbc 100644
--- a/cookbook/track_battery_level/index.html
+++ b/cookbook/track_battery_level/index.html
@@ -151,6 +151,9 @@
Examples for flashing lights
+
+ Examples using first light
+
Examples using the sun
diff --git a/cookbook/turn_on_light_for_10_minutes_when_motion_detected/index.html b/cookbook/turn_on_light_for_10_minutes_when_motion_detected/index.html
index 30215b5ecd..00b245c6f3 100644
--- a/cookbook/turn_on_light_for_10_minutes_when_motion_detected/index.html
+++ b/cookbook/turn_on_light_for_10_minutes_when_motion_detected/index.html
@@ -159,6 +159,9 @@
Examples for flashing lights
+
+ Examples using first light
+
Examples using the sun
diff --git a/sitemap.xml b/sitemap.xml
index 5359c34cd1..350111a08e 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -2221,6 +2221,9 @@
https://home-assistant.io/cookbook/configuration_yaml_by_mertenats/
+https://home-assistant.io/cookbook/automation_first_light/
+
+
https://home-assistant.io/cookbook/configuration_yaml_by_carlo_costanzo/
@@ -2309,62 +2312,62 @@
https://home-assistant.io/demo/frontend.html
-2016-11-19T10:32:25+00:00
+2016-11-19T23:38:42+00:00
https://home-assistant.io/demo/index.html
-2016-11-19T10:32:25+00:00
+2016-11-19T23:38:42+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-event.html
-2016-11-19T10:32:25+00:00
+2016-11-19T23:38:42+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-info.html
-2016-11-19T10:32:25+00:00
+2016-11-19T23:38:42+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-service.html
-2016-11-19T10:32:25+00:00
+2016-11-19T23:38:42+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-state.html
-2016-11-19T10:32:25+00:00
+2016-11-19T23:38:42+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-template.html
-2016-11-19T10:32:25+00:00
+2016-11-19T23:38:42+00:00
https://home-assistant.io/demo/panels/ha-panel-history.html
-2016-11-19T10:32:25+00:00
+2016-11-19T23:38:42+00:00
https://home-assistant.io/demo/panels/ha-panel-iframe.html
-2016-11-19T10:32:25+00:00
+2016-11-19T23:38:42+00:00
https://home-assistant.io/demo/panels/ha-panel-logbook.html
-2016-11-19T10:32:25+00:00
+2016-11-19T23:38:42+00:00
https://home-assistant.io/demo/panels/ha-panel-map.html
-2016-11-19T10:32:25+00:00
+2016-11-19T23:38:42+00:00
https://home-assistant.io/googlef4f3693c209fe788.html
-2016-11-19T10:32:25+00:00
+2016-11-19T23:38:42+00:00
https://home-assistant.io/static/fonts/roboto/DESCRIPTION.en_us.html
-2016-11-19T10:32:26+00:00
+2016-11-19T23:38:42+00:00
https://home-assistant.io/static/fonts/robotomono/DESCRIPTION.en_us.html
-2016-11-19T10:32:26+00:00
+2016-11-19T23:38:42+00:00
https://home-assistant.io/static/mdi-demo.html
-2016-11-19T10:32:26+00:00
+2016-11-19T23:38:42+00:00