diff --git a/atom.xml b/atom.xml index c964807e8a..1c7b700e06 100644 --- a/atom.xml +++ b/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Home Assistant]]> - 2016-07-26T05:46:31+00:00 + 2016-07-26T05:49:28+00:00 https://home-assistant.io/ diff --git a/blog/categories/community/atom.xml b/blog/categories/community/atom.xml index d477d64301..f83a023511 100644 --- a/blog/categories/community/atom.xml +++ b/blog/categories/community/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Community | Home Assistant]]> - 2016-07-26T05:46:31+00:00 + 2016-07-26T05:49:28+00:00 https://home-assistant.io/ diff --git a/blog/categories/device-tracking/atom.xml b/blog/categories/device-tracking/atom.xml index b7565304a7..0d04bc6d35 100644 --- a/blog/categories/device-tracking/atom.xml +++ b/blog/categories/device-tracking/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Device-Tracking | Home Assistant]]> - 2016-07-26T05:46:31+00:00 + 2016-07-26T05:49:28+00:00 https://home-assistant.io/ diff --git a/blog/categories/esp8266/atom.xml b/blog/categories/esp8266/atom.xml index a75d77cbf8..312858fa70 100644 --- a/blog/categories/esp8266/atom.xml +++ b/blog/categories/esp8266/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: ESP8266 | Home Assistant]]> - 2016-07-26T05:46:31+00:00 + 2016-07-26T05:49:28+00:00 https://home-assistant.io/ diff --git a/blog/categories/how-to/atom.xml b/blog/categories/how-to/atom.xml index bc0edc75de..1026d51764 100644 --- a/blog/categories/how-to/atom.xml +++ b/blog/categories/how-to/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: How-To | Home Assistant]]> - 2016-07-26T05:46:31+00:00 + 2016-07-26T05:49:28+00:00 https://home-assistant.io/ diff --git a/blog/categories/ibeacons/atom.xml b/blog/categories/ibeacons/atom.xml index 76029637eb..5ed7e02f83 100644 --- a/blog/categories/ibeacons/atom.xml +++ b/blog/categories/ibeacons/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: iBeacons | Home Assistant]]> - 2016-07-26T05:46:31+00:00 + 2016-07-26T05:49:28+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 df143d5c51..120e710559 100644 --- a/blog/categories/internet-of-things/atom.xml +++ b/blog/categories/internet-of-things/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Internet-of-Things | Home Assistant]]> - 2016-07-26T05:46:31+00:00 + 2016-07-26T05:49:28+00:00 https://home-assistant.io/ diff --git a/blog/categories/iot-data/atom.xml b/blog/categories/iot-data/atom.xml index 768bb93de4..aebf891647 100644 --- a/blog/categories/iot-data/atom.xml +++ b/blog/categories/iot-data/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: IoT-Data | Home Assistant]]> - 2016-07-26T05:46:31+00:00 + 2016-07-26T05:49:28+00:00 https://home-assistant.io/ diff --git a/blog/categories/mqtt/atom.xml b/blog/categories/mqtt/atom.xml index 9b613fdd32..8244f061b9 100644 --- a/blog/categories/mqtt/atom.xml +++ b/blog/categories/mqtt/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: MQTT | Home Assistant]]> - 2016-07-26T05:46:31+00:00 + 2016-07-26T05:49:28+00:00 https://home-assistant.io/ diff --git a/blog/categories/organisation/atom.xml b/blog/categories/organisation/atom.xml index 16f2576432..db9de9d2c3 100644 --- a/blog/categories/organisation/atom.xml +++ b/blog/categories/organisation/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Organisation | Home Assistant]]> - 2016-07-26T05:46:31+00:00 + 2016-07-26T05:49:28+00:00 https://home-assistant.io/ diff --git a/blog/categories/owntracks/atom.xml b/blog/categories/owntracks/atom.xml index 1d46be9270..51c0416672 100644 --- a/blog/categories/owntracks/atom.xml +++ b/blog/categories/owntracks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: OwnTracks | Home Assistant]]> - 2016-07-26T05:46:31+00:00 + 2016-07-26T05:49:28+00:00 https://home-assistant.io/ diff --git a/blog/categories/presence-detection/atom.xml b/blog/categories/presence-detection/atom.xml index 5bdb227b96..00fd0b50a4 100644 --- a/blog/categories/presence-detection/atom.xml +++ b/blog/categories/presence-detection/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Presence-Detection | Home Assistant]]> - 2016-07-26T05:46:31+00:00 + 2016-07-26T05:49:28+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 ad3615e740..3185be8874 100644 --- a/blog/categories/public-service-announcement/atom.xml +++ b/blog/categories/public-service-announcement/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Public-Service-Announcement | Home Assistant]]> - 2016-07-26T05:46:31+00:00 + 2016-07-26T05:49:28+00:00 https://home-assistant.io/ diff --git a/blog/categories/release-notes/atom.xml b/blog/categories/release-notes/atom.xml index 84b65313cc..a37cc1f4f3 100644 --- a/blog/categories/release-notes/atom.xml +++ b/blog/categories/release-notes/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Release-Notes | Home Assistant]]> - 2016-07-26T05:46:31+00:00 + 2016-07-26T05:49:28+00:00 https://home-assistant.io/ diff --git a/blog/categories/survey/atom.xml b/blog/categories/survey/atom.xml index 96d4c7a08a..a79fe848e3 100644 --- a/blog/categories/survey/atom.xml +++ b/blog/categories/survey/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Survey | Home Assistant]]> - 2016-07-26T05:46:31+00:00 + 2016-07-26T05:49:28+00:00 https://home-assistant.io/ diff --git a/blog/categories/talks/atom.xml b/blog/categories/talks/atom.xml index 1c8fa7ade7..f5b48ea81c 100644 --- a/blog/categories/talks/atom.xml +++ b/blog/categories/talks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Talks | Home Assistant]]> - 2016-07-26T05:46:31+00:00 + 2016-07-26T05:49:28+00:00 https://home-assistant.io/ diff --git a/blog/categories/technology/atom.xml b/blog/categories/technology/atom.xml index 2bac27ee1b..f22648da0b 100644 --- a/blog/categories/technology/atom.xml +++ b/blog/categories/technology/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Technology | Home Assistant]]> - 2016-07-26T05:46:31+00:00 + 2016-07-26T05:49:28+00:00 https://home-assistant.io/ diff --git a/blog/categories/user-stories/atom.xml b/blog/categories/user-stories/atom.xml index b096e9af9c..bfa19a02ff 100644 --- a/blog/categories/user-stories/atom.xml +++ b/blog/categories/user-stories/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: User-Stories | Home Assistant]]> - 2016-07-26T05:46:31+00:00 + 2016-07-26T05:49:28+00:00 https://home-assistant.io/ diff --git a/blog/categories/video/atom.xml b/blog/categories/video/atom.xml index 880308b97a..948976f84b 100644 --- a/blog/categories/video/atom.xml +++ b/blog/categories/video/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Video | Home Assistant]]> - 2016-07-26T05:46:31+00:00 + 2016-07-26T05:49:28+00:00 https://home-assistant.io/ diff --git a/blog/categories/website/atom.xml b/blog/categories/website/atom.xml index 56da85a91b..9797b1320a 100644 --- a/blog/categories/website/atom.xml +++ b/blog/categories/website/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Website | Home Assistant]]> - 2016-07-26T05:46:31+00:00 + 2016-07-26T05:49:28+00:00 https://home-assistant.io/ diff --git a/sitemap.xml b/sitemap.xml index 76bd60dbf1..3fbb07b2e5 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1986,34 +1986,34 @@ https://home-assistant.io/demo/dev-tools.html - 2016-07-26T05:45:54+00:00 + 2016-07-26T05:48:43+00:00 https://home-assistant.io/demo/frontend.html - 2016-07-26T05:45:54+00:00 + 2016-07-26T05:48:43+00:00 https://home-assistant.io/demo/index.html - 2016-07-26T05:45:54+00:00 + 2016-07-26T05:48:43+00:00 https://home-assistant.io/demo/partial-map.html - 2016-07-26T05:45:54+00:00 + 2016-07-26T05:48:43+00:00 https://home-assistant.io/googlef4f3693c209fe788.html - 2016-07-26T05:45:54+00:00 + 2016-07-26T05:48:43+00:00 https://home-assistant.io/static/fonts/roboto/DESCRIPTION.en_us.html - 2016-07-26T05:45:55+00:00 + 2016-07-26T05:48:43+00:00 https://home-assistant.io/static/fonts/robotomono/DESCRIPTION.en_us.html - 2016-07-26T05:45:55+00:00 + 2016-07-26T05:48:43+00:00 https://home-assistant.io/static/mdi-demo.html - 2016-07-26T05:45:55+00:00 + 2016-07-26T05:48:43+00:00 diff --git a/topics/splitting_configuration/index.html b/topics/splitting_configuration/index.html index 40f96df15b..d0128d0cef 100644 --- a/topics/splitting_configuration/index.html +++ b/topics/splitting_configuration/index.html @@ -273,7 +273,7 @@ customize.yaml

If you have issues checkout home-assistant.log in the configuration directory as well as your indentations. If all else fails, head over to the Gitter Chatroom and ask away.

-

Advanced usage

+

Advanced Usage

We offer four advanced options to include whole directories at once.

@@ -285,6 +285,291 @@ customize.yaml

!include_dir_merge_named will return content of a directory as a dictionary by loading each file and merging it into 1 big dictionary.

+

Example: !include_dir_list

+ +

configuration.yaml

+ +
+
automation:
+  - alias: Automation 1
+    trigger:
+      platform: state
+      entity_id: device_tracker.iphone
+      to: 'home'
+    action:
+      service: light.turn_on
+      entity_id: light.entryway
+  - alias: Automation 2
+    trigger:
+      platform: state
+      entity_id: device_tracker.iphone
+      from: 'home'
+    action:
+      service: light.turn_off
+      entity_id: light.entryway
+
+
+
+ +

can be turned into:

+ +

configuration.yaml

+ +
+
automation: !include_dir_list automation/presence/
+
+
+
+ +

automation/presence/automation1.yaml

+ +
+
alias: Automation 1
+trigger:
+  platform: state
+  entity_id: device_tracker.iphone
+  to: 'home'
+action:
+  service: light.turn_on
+  entity_id: light.entryway
+
+
+
+ +

automation/presence/automation2.yaml

+ +
+
alias: Automation 2
+trigger:
+  platform: state
+  entity_id: device_tracker.iphone
+  from: 'home'
+action:
+  service: light.turn_off
+  entity_id: light.entryway
+
+
+
+ +

It is important to note that each file must contain only one entry when using !include_dir_list.

+ +

Example: !include_dir_named

+ +

configuration.yaml

+ +
+
+alexa:
+  intents:
+    LocateIntent:
+      action:
+        service: notify.pushover
+        data:
+          message: Your location has been queried via Alexa.
+      speech:
+        type: plaintext
+        text: >
+          {%- for state in states.device_tracker -%}
+            {%- if state.name.lower() == User.lower() -%}
+              {{ state.name }} is at {{ state.state }}
+            {%- endif -%}
+          {%- else -%}
+            I am sorry. Pootie! I do not know where {{User}} is.
+          {%- endfor -%}
+    WhereAreWeIntent:
+      speech:
+        type: plaintext
+        text: >
+          {%- if is_state('device_tracker.iphone', 'home') -%}
+            iPhone is home.
+          {%- else -%}
+            iPhone is not home.
+          {% endif %}
+
+
+
+ +

can be turned into:

+ +

configuration.yaml

+ +
+
alexa:
+  intents: !include_dir_named alexa/
+
+
+
+ +

alexa/LocateIntent.yaml

+ +
+
+action:
+  service: notify.pushover
+  data:
+    message: Your location has been queried via Alexa.
+speech:
+  type: plaintext
+  text: >
+    {%- for state in states.device_tracker -%}
+      {%- if state.name.lower() == User.lower() -%}
+        {{ state.name }} is at {{ state.state }}
+      {%- endif -%}
+    {%- else -%}
+      I am sorry. Pootie! I do not know where {{User}} is.
+    {%- endfor -%}
+
+
+
+ +

alexa/WhereAreWeIntent.yaml

+ +
+
+speech:
+  type: plaintext
+  text: >
+    {%- if is_state('device_tracker.iphone', 'home') -%}
+      iPhone is home.
+    {%- else -%}
+      iPhone is not home.
+    {% endif %}
+
+
+
+ +

Example: !include_dir_merge_list

+ +

configuration.yaml

+ +
+
automation:
+  - alias: Automation 1
+    trigger:
+      platform: state
+      entity_id: device_tracker.iphone
+      to: 'home'
+    action:
+      service: light.turn_on
+      entity_id: light.entryway
+  - alias: Automation 2
+    trigger:
+      platform: state
+      entity_id: device_tracker.iphone
+      from: 'home'
+    action:
+      service: light.turn_off
+      entity_id: light.entryway
+
+
+
+ +

can be turned into:

+ +

configuration.yaml

+ +
+
automation: !include_dir_merge_list automation/
+
+
+
+ +

automation/presence.yaml

+ +
+
- alias: Automation 1
+  trigger:
+    platform: state
+    entity_id: device_tracker.iphone
+    to: 'home'
+  action:
+    service: light.turn_on
+    entity_id: light.entryway
+    
+- alias: Automation 2
+  trigger:
+    platform: state
+    entity_id: device_tracker.iphone
+    from: 'home'
+  action:
+    service: light.turn_off
+    entity_id: light.entryway
+
+
+
+ +

It is important to note that when using !include_dir_merge_list, you must include a list in each file (each list item is denoted with a hyphen [-]). Each file may contain one or more entries.

+ +

Example: !include_dir_merge_named

+ +

configuration.yaml

+ +
+
group:
+  bedroom:
+    name: Bedroom
+    entities:
+      - light.bedroom_lamp
+      - light.bedroom_overhead
+  hallway:
+    name: Hallway
+    entities:
+      - light.hallway
+      - thermostat.home
+  front_yard:
+    name: Front Yard
+    entities:
+      - light.front_porch
+      - light.security
+      - light.pathway
+      - sensor.mailbox
+      - camera.front_porch
+
+
+
+ +

can be turned into:

+ +

configuration.yaml

+ +
+
group: !include_dir_merge_named group/
+
+
+
+ +

group/interior.yaml

+ +
+
bedroom:
+  name: Bedroom
+  entities:
+    - light.bedroom_lamp
+    - light.bedroom_overhead
+hallway:
+  name: Hallway
+  entities:
+    - light.hallway
+    - thermostat.home
+
+
+
+ +

group/exterior.yaml

+ +
+
front_yard:
+  name: Front Yard
+  entities:
+    - light.front_porch
+    - light.security
+    - light.pathway
+    - sensor.mailbox
+    - camera.front_porch
+
+
+
+