fix markdown warnings

This commit is contained in:
mampfes
2022-12-28 17:36:18 +01:00
parent 093c1c63ae
commit f321a47531
3 changed files with 24 additions and 12 deletions

View File

@@ -14,7 +14,6 @@ This is implemented using the following markup:
The empty line after the <p> is intentional and is required for the expand/collapse to function correctly. The empty line after the <p> is intentional and is required for the expand/collapse to function correctly.
--> -->
<img src="/images/icon.png" alt="Waste Collection Schedule logo" title="Waste Collection Schedule" align="right" height="60" /> <img src="/images/icon.png" alt="Waste Collection Schedule logo" title="Waste Collection Schedule" align="right" height="60" />
# Frequently Asked Questions, or "How Do I ...?" # Frequently Asked Questions, or "How Do I ...?"
@@ -38,9 +37,9 @@ date_template: '{{value.date.strftime("%m/%d/%Y")}}'
value_template: '{{value.date.strftime("%a, %m/%d/%Y")}}' value_template: '{{value.date.strftime("%a, %m/%d/%Y")}}'
date_template: '{{value.date.strftime("%a, %m/%d/%Y")}}' date_template: '{{value.date.strftime("%a, %m/%d/%Y")}}'
``` ```
</p> </p>
</details> </details>
<details> <details>
<summary>How do I show the number of days to the next collection?</summary> <summary>How do I show the number of days to the next collection?</summary>
<p> <p>
@@ -50,9 +49,9 @@ Set `value_template` within the sensor configuration:
```yaml ```yaml
value_template: 'in {{value.daysTo}} days' value_template: 'in {{value.daysTo}} days'
``` ```
</p> </p>
</details> </details>
<details> <details>
<summary>How do I show Today / Tomorrow instead of in 0 / 1 days?</summary> <summary>How do I show Today / Tomorrow instead of in 0 / 1 days?</summary>
<p> <p>
@@ -65,6 +64,7 @@ Set `value_template` within the sensor configuration:
# returns "in X days" if value.daysTo > 1 # returns "in X days" if value.daysTo > 1
value_template: '{% if value.daysTo == 0 %}Today{% elif value.daysTo == 1 %}Tomorrow{% else %}in {{value.daysTo}} days{% endif %}' value_template: '{% if value.daysTo == 0 %}Today{% elif value.daysTo == 1 %}Tomorrow{% else %}in {{value.daysTo}} days{% endif %}'
``` ```
</p> </p>
</details> </details>
@@ -95,6 +95,7 @@ Set `value_template` within the sensor configuration:
```yaml ```yaml
value_template: '{{value.daysTo}}' value_template: '{{value.daysTo}}'
``` ```
</p> </p>
</details> </details>
@@ -107,6 +108,7 @@ Set `value_template` within the sensor configuration:
```yaml ```yaml
value_template: '{{value.date.strftime("%m/%d/%Y")}}' value_template: '{{value.date.strftime("%m/%d/%Y")}}'
``` ```
</p> </p>
</details> </details>
@@ -119,6 +121,7 @@ Set `value_template` within the sensor configuration:
```yaml ```yaml
value_template: '{{value.types|join(", ")}}' value_template: '{{value.types|join(", ")}}'
``` ```
</p> </p>
</details> </details>
@@ -162,6 +165,7 @@ waste_collection_schedule:
- type: Very long recycle name - type: Very long recycle name
alias: Recycle alias: Recycle
``` ```
</p> </p>
</details> </details>
@@ -179,6 +183,7 @@ waste_collection_schedule:
- type: Unwanted Waste Type - type: Unwanted Waste Type
show: false show: false
``` ```
</p> </p>
</details> </details>
@@ -228,6 +233,7 @@ state:
value: '[[[ return entity.state.split("|")[1] == 1 ]]]' value: '[[[ return entity.state.split("|")[1] == 1 ]]]'
- value: default - value: default
``` ```
</p> </p>
</details> </details>
@@ -266,6 +272,7 @@ sensor:
entity: sensor.garbage entity: sensor.garbage
type: 'custom:garbage-collection-card' type: 'custom:garbage-collection-card'
``` ```
</p> </p>
</details> </details>
@@ -278,4 +285,3 @@ Prerequisites: You already have dedicated sensors per waste type and want to sho
Add `add_days_to: True` to the configuration of all sensors you want to sort. This will add the attribute `daysTo` which can be used by e.g. [auto-entities](https://github.com/thomasloven/lovelace-auto-entities) to sort entities by day of next collection. Add `add_days_to: True` to the configuration of all sensors you want to sort. This will add the attribute `daysTo` which can be used by e.g. [auto-entities](https://github.com/thomasloven/lovelace-auto-entities) to sort entities by day of next collection.
</p> </p>
</details> </details>

View File

@@ -3,12 +3,14 @@
# Installation # Installation
## Automated Installation Using HACS ## Automated Installation Using HACS
![hacs_badge](https://img.shields.io/badge/HACS-Default-orange) ![hacs_badge](https://img.shields.io/badge/HACS-Default-orange)
![hacs installs](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Flauwbier.nl%2Fhacs%2Fwaste_collection_schedule) ![hacs installs](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Flauwbier.nl%2Fhacs%2Fwaste_collection_schedule)
The `Waste Collection Schedule` component can be installed via [HACS](https://hacs.xyz/). This allows you to be notified of any updates or new releases of the component. The `Waste Collection Schedule` component can be installed via [HACS](https://hacs.xyz/). This allows you to be notified of any updates or new releases of the component.
After installing HACS: After installing HACS:
1. Visit the HACS `Integrations` panel in Home Assistant. 1. Visit the HACS `Integrations` panel in Home Assistant.
2. Click `Explore & Download Repositories`. 2. Click `Explore & Download Repositories`.
3. Search for `Waste Collection Schedule`. 3. Search for `Waste Collection Schedule`.
@@ -67,7 +69,6 @@ waste_collection_schedule:
separator: SEPARATOR separator: SEPARATOR
``` ```
| Parameter | Type | Requirement | Description | | Parameter | Type | Requirement | Description |
|-----|-----|-----|-----| |-----|-----|-----|-----|
| sources: | | required | Contains information for the service provider being used | | sources: | | required | Contains information for the service provider being used |
@@ -105,6 +106,7 @@ sensor:
- Waste Type 1 - Waste Type 1
- Waste Type 2 - Waste Type 2
``` ```
| Parameter | Type | Requirement | Description | | Parameter | Type | Requirement | Description |
|--|--|--|--| |--|--|--|--|
| platform | | required | waste_collection_schedule | | platform | | required | waste_collection_schedule |
@@ -118,8 +120,10 @@ sensor:
| add_days_to | boolean | optional | Adds a `daysTo` attribute to the source entity state containing the number of days to the next collection | | add_days_to | boolean | optional | Adds a `daysTo` attribute to the source entity state containing the number of days to the next collection |
| types | list of strings | optional | Used to filter waste types. The sensor will only display collections matching these waste types | | 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 ## ## Options for _details_format_ parameter
Possible choices: Possible choices:
| upcoming | appointment_types | generic | | upcoming | appointment_types | generic |
|--|--|--| |--|--|--|
| shows a list of upcoming collections |shows a list of waste types and their next collection date | provides all attributes as generic Python data types. | | shows a list of upcoming collections |shows a list of waste types and their next collection date | provides all attributes as generic Python data types. |
@@ -135,15 +139,16 @@ The following variables can be used within `value_template` and `date_template`:
| `value.daysTo` | Days to collection | int | 0 = today, 1 = tomorrow, etc | | `value.daysTo` | Days to collection | int | 0 = today, 1 = tomorrow, etc |
| `value.types` | Waste types | list of strings | Use `join` filter to join types | | `value.types` | Waste types | list of strings | Use `join` filter to join types |
## HomeAssistant Service to manually update the source ## HomeAssistant Service to manually trigger update
If you want to manually update the source, you can call the service: If you want to trigger a manual update of the sources, you can call the service:
`waste_collection_schedule.fetch_data` `waste_collection_schedule.fetch_data`
Normally the configuration parametet 'fetch_time' is used to do this periodically. Normally the configuration option 'fetch_time' is used to do this periodically.
## Further Help
## Further help ##
For a full example, see [custom_components/waste_collection_schedule/waste_collection_schedule/source/example.py](/custom_components/waste_collection_schedule/waste_collection_schedule/source/example.py). For a full example, see [custom_components/waste_collection_schedule/waste_collection_schedule/source/example.py](/custom_components/waste_collection_schedule/waste_collection_schedule/source/example.py).
For other examples on how to configure source(s) and sensor(s), see the [FAQ](/doc/faq.md). For other examples on how to configure source(s) and sensor(s), see the [FAQ](/doc/faq.md).

View File

@@ -10,12 +10,13 @@ Github Markdown reference: https://docs.github.com/en/get-started/writing-on-git
<!-- The page content --> <!-- The page content -->
## Community Forum ## Community Forum
![Community Discussion](https://img.shields.io/badge/Home%20Assistant%20Community-Discussion-orange) ![Community Discussion](https://img.shields.io/badge/Home%20Assistant%20Community-Discussion-orange)
The main discussion thread on Home Assistant's Community forum can be found [here](https://community.home-assistant.io/t/waste-collection-schedule-framework/186492). The main discussion thread on Home Assistant's Community forum can be found [here](https://community.home-assistant.io/t/waste-collection-schedule-framework/186492).
## YouTube
## YouTube
There are some videos on YouTube: There are some videos on YouTube:
- [Bunte Mülltonnenerinnerung mit Home Assistant](https://youtu.be/MzQgARDvRww) (German language) - [Bunte Mülltonnenerinnerung mit Home Assistant](https://youtu.be/MzQgARDvRww) (German language)