add sensor examples

This commit is contained in:
mampfes
2020-12-20 18:19:38 +01:00
parent 27945df03c
commit acb5dc0d66
2 changed files with 24 additions and 0 deletions

View File

@@ -237,6 +237,30 @@ Examples:
## Examples
### Individual sensors
Add multiple sensors if you want to have individual information:
![Sensor Examples](./doc/sensor-examples.png "Sensor Examples")
```yaml
sensor:
- platform: waste_collection_schedule
name: next_waste_collection_type
details_format: upcoming
value_template: '{{value.types|join(", ")}}'
- platform: waste_collection_schedule
name: next_waste_collection_date
details_format: upcoming
value_template: '{{value.date.strftime("%d.%m.%Y")}}'
- platform: waste_collection_schedule
name: next_waste_collection_daysto
details_format: upcoming
value_template: '{{value.types|join(", ")}} in {{value.daysTo}} days'
```
### Button Cards
[Button Cards](https://github.com/custom-cards/button-card) can be used to create individual widgets:

BIN
doc/sensor-examples.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB