diff --git a/doc/faq.md b/doc/faq.md index 134bcf6a..d60bdcef 100644 --- a/doc/faq.md +++ b/doc/faq.md @@ -125,6 +125,33 @@ value_template: '{{value.types|join(", ")}}'

+
+How do I configure sensors which show the first, second, third collection? +

+ +Set `event_index` within the sensor configuration: + +```yaml +sensor: + - platform: waste_collection_schedule + name: first_garbage_collection + event_index: 0 + value_template: '{{value.types|join(", ")}} in {{ value.daysTo }} days' + + - platform: waste_collection_schedule + name: second_garbage_collection + event_index: 1 + value_template: '{{value.types|join(", ")}} in {{ value.daysTo }} days' + + - platform: waste_collection_schedule + name: third_garbage_collection + event_index: 3 + value_template: '{{value.types|join(", ")}} in {{ value.daysTo }} days' +``` + +

+
+
How do I configure a sensor to show only collections of a specific waste type? diff --git a/doc/installation.md b/doc/installation.md index 332581d0..96c65250 100644 --- a/doc/installation.md +++ b/doc/installation.md @@ -113,6 +113,7 @@ sensor: value_template: VALUE_TEMPLATE date_template: DATE_TEMPLATE add_days_to: ADD_DAYS_TO + event_index: EVENT_INDEX types: - Waste Type 1 - Waste Type 2 @@ -129,6 +130,7 @@ sensor: | value_template | string | optional | Uses Home Assistant templating to format the state information of an entity. See [template variables](#template-variables-for-value_template-and-date_template-parameters) for further details | | date_template | string | optional | Uses Home Assistant templating to format the dates appearing within the _more info_ popup information of an entity. See [template variables](#template-variables-for-value_template-and-date_template-parameters) for further details | | add_days_to | boolean | optional | Adds a `daysTo` attribute to the source entity state containing the number of days to the next collection | +| event_index | int | optional | Used to assign a sensor to a specific pickup date index. The next pickup date has event_index 0. Useful if you want to have dedicated sensors for next collection, second collection, third collection, ... | | types | list of strings | optional | Used to filter waste types. The sensor will only display collections matching these waste types | ## Options for _details_format_ parameter