diff --git a/atom.xml b/atom.xml index 367ffcfd2f..cae78ed904 100644 --- a/atom.xml +++ b/atom.xml @@ -4,7 +4,7 @@
input_boolean:
+ trigger_first_morning:
+ name: Waiting for first morning motion
+ icon: mdi:kettle
+
+## 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
+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
+# 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'
+# 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
+ 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
+ # 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
+ # 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
-```
+
+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 -``` +# 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
+
+There are two ways to launch Home Assistant. If you are in the virtualenv, you can just run hass
and it will work as normal. If the virtualenv is not activated, you just use the hass
executable in the bin
directory mentioned earlier. There is one caveat… Because Home Assistant stores it’s configuration in the user’s home directory, we need to be the user hass
user or specify the configuration with -c
.
There are two ways to launch Home Assistant. If you are in the virtualenv, you can just run hass
and it will work as normal. If the virtualenv is not activated, you just use the hass
executable in the bin
directory mentioned earlier. There is one caveat… Because Home Assistant stores its configuration in the user’s home directory, we need to be the user hass
user or specify the configuration with -c
.
$ sudo -u hass -H /srv/hass/bin/hass
diff --git a/sitemap.xml b/sitemap.xml
index f9a436bbd6..2e76b17278 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -2349,62 +2349,62 @@