Skip to content

Home Assisant sensor component for RAD Hoekschewaard Afval Kalender

License

Notifications You must be signed in to change notification settings

Johnwulp/rad-afval

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RAD Hoekschewaard Afval Kalender

hacs_badge made-with-python Open Source Love png1

Buy Me A Coffee

Home Assisant sensor component for RAD Hoekschewaard Afval Kalender

Provides Home Assistant sensors for the Dutch waste collectors RAD Hoekschewaard Check your postalcode on https://www.radbv.nl/afvalkalender/

Source and images is copied from: https://github.com/pippyn/Home-Assistant-Sensor-Afvalbeheer https://github.com/xirixiz/Home-Assistant-Sensor-Afvalwijzer

Install:

There are two ways to install:

Manual:

  • Copy the files in the /custom_components/rad-afval/ folder to: [homeassistant]/custom_components/rad-afval/
  • Restart homeassistant

HACS:

  • Find plugin under integration
  • Restart homeassistant

After install, create config:

Example config:

sensor:
  - platform: rad-afval
    resources:
      - gft
      - papier
      - pmd
      - rest
    postalcode: 3262CD
    streetnumber: 5
    dateformat: '%a %d %b'

New parameter companycode

Since dec 2020 the API has changed, and uses a new parameter called 'companycode'. The default value is always: '13a2cad9-36d0-4b01-b877-efcb421a864d' but can be changed to something else if needed in the configuration of the sensor.

Available resources:

  • gft 'Gft-container'
  • papier 'Papiercontainer (indien van toepassing)'
  • pmd 'PMD - P(lastic)M(etaal)D(rinkpakken)'
  • rest 'Restafvalcontainer'

Date format

If you want to adjust the way the date is presented. You can do it using the dateformat option. All python strftime options should work. Default is '%d-%m-%Y', which will result in per example:

21-1-2020

If you wish to remove the year and the dashes and want to show the name of the month abbreviated, you would provide '%d %b'. Which will result in:

21 Jan

Interface on frontend

For a great looking, and sortable card, please install https://github.com/thomasloven/lovelace-auto-entities Frontend

After installation you can use this in frontend:

card:
  type: glance
filter:
  include:
    - entity_id: sensor.rad_hw_afval_restafval
    - entity_id: sensor.rad_hw_afval_pmd
    - entity_id: sensor.rad_hw_afval_oud_papier
    - entity_id: sensor.rad_hw_afval_gft
sort:
  attribute: next_pickup_in_days
  method: attribute
  numeric: true
type: 'custom:auto-entities'

I renamed the sensors to shorter one's with this in configuration.yaml:

homeassistant:
  customize:
    sensor.rad_hw_afval_gft:
      friendly_name: GFT
    sensor.rad_hw_afval_oud_papier:
      friendly_name: Papier
    sensor.rad_hw_afval_pmd:
      friendly_name: Plastic
    sensor.rad_hw_afval_restafval:
      friendly_name: Rest

Changelog

  • Version: 0.0.1 20200210 - Initial Release
  • Version: 0.0.2 20201229 - Changes for new API
  • Version: 0.0.3 20210822 - Changed filter to include today for 'next_pickup_in_days' sensor. Value will be 0 if pickup is today
  • Version: 0.0.4 20220203 - Changed device state property

About

Home Assisant sensor component for RAD Hoekschewaard Afval Kalender

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages