Hi there,
Im playing with HA for 2 days now and really enjoying the flexibilty. Next step is to integrate the garbage pickup but I
m really struggling here. im trying to follow the installation howto but I
m stuck on the configuration.yaml part.
Where should I add
- platform: afvalwijzer
provider: mijnafvalwijzer # (required, default = mijnafvalwijzer) either choose mijnafvalwijzer, afvalstoffendienstkalender or rova
postal_code: 1234AB # (required, default = '')
street_number: 5 # (required, default = '')
suffix: '' # (optional, default = '')
exclude_pickup_today: true # (optional, default = true) to take or not to take Today into account in the next pickup.
default_label: Geen # (optional, default = Geen) label if no date found
id: '' # (optional, default = '') use if you'd like to have multiple waste pickup locations in HASS
exclude_list: '' # (optional, default = '') comma separated list of wast types (case ignored). F.e. "papier, gft"
In my current configuration.yaml I`m reffering sensors to sensors.yaml with:
sensor: !include sensors.yaml
so I thought I should insert the code into the sensors.yaml but when I check the configuration it tells me there is something wrong here. I`ve aded the following in sensors.yaml:
- platform: afvalwijzer
provider: mijnafvalwijzer
postal_code: 6135JR
street_number: 4
exclude_pickup_today: true
default_label: Geen
exclude_list: ''
- platform: template
sensors:
afvalwijzer_restafval_next:
friendly_name: Restafval
entity_picture_template: /local/afvalwijzer/rest.png
value_template: >
{{state_attr('sensor.afvalwijzer_restafval','days_until_collection_date')}}
attribute_templates:
day: >
{{as_timestamp(strptime(states('sensor.afvalwijzer_restafval'),'%d-%m-%Y'))
|timestamp_custom('%A')}}
date: >
{{as_timestamp(strptime(states('sensor.afvalwijzer_restafval'),'%d-%m-%Y'))
|timestamp_custom('%a %d %b')}}
timestamp: >
{{as_timestamp(strptime(states('sensor.afvalwijzer_restafval'),'%d-%m-%Y'))}}
afvalwijzer_gft_next:
friendly_name: GFT
entity_picture_template: /local/afvalwijzer/gft.png
value_template: >
{{state_attr('sensor.afvalwijzer_gft','days_until_collection_date')}}
attribute_templates:
day: >
{{as_timestamp(strptime(states('sensor.afvalwijzer_gft'),'%d-%m-%Y'))
|timestamp_custom('%A')}}
date: >
{{as_timestamp(strptime(states('sensor.afvalwijzer_gft'),'%d-%m-%Y'))
|timestamp_custom('%a %d %b')}}
timestamp: >
{{as_timestamp(strptime(states('sensor.afvalwijzer_gft'),'%d-%m-%Y'))}}
afvalwijzer_plastic_next:
friendly_name: Plastic
entity_picture_template: /local/afvalwijzer/plastic.png
value_template: >
{{state_attr('sensor.afvalwijzer_plastic','days_until_collection_date')}}
attribute_templates:
day: >
{{as_timestamp(strptime(states('sensor.afvalwijzer_plastic'),'%d-%m-%Y'))
|timestamp_custom('%A')}}
date: >
{{as_timestamp(strptime(states('sensor.afvalwijzer_plastic'),'%d-%m-%Y'))
|timestamp_custom('%a %d %b')}}
timestamp: >
{{as_timestamp(strptime(states('sensor.afvalwijzer_plastic'),'%d-%m-%Y'))}}
afvalwijzer_papier_next:
friendly_name: Papier
entity_picture_template: /local/afvalwijzer/papier.png
value_template: >
{{state_attr('sensor.afvalwijzer_papier','days_until_collection_date')}}
attribute_templates:
day: >
{{as_timestamp(strptime(states('sensor.afvalwijzer_papier'),'%d-%m-%Y'))
|timestamp_custom('%A')}}
date: >
{{as_timestamp(strptime(states('sensor.afvalwijzer_papier'),'%d-%m-%Y'))
|timestamp_custom('%a %d %b')}}
timestamp: >
{{as_timestamp(strptime(states('sensor.afvalwijzer_papier'),'%d-%m-%Y'))}}
When checking the config without the following code the file is considered ok and the sensors are created however obviusly without data because its missing this vital part…
- platform: afvalwijzer
provider: mijnafvalwijzer
postal_code: 6135JR
street_number: 4
exclude_pickup_today: true
default_label: Geen
exclude_list: ''
Any help is much appriciated