Skip to content

Commit

Permalink
Merge pull request #104 from xirixiz/add_rova
Browse files Browse the repository at this point in the history
add rova
  • Loading branch information
xirixiz authored Oct 22, 2020
2 parents 77d67c2 + b984a81 commit 4e5f175
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 330 deletions.
4 changes: 2 additions & 2 deletions INFO.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
```yaml
sensor:
- platform: afvalwijzer
provider: mijnafvalwijzer # (required, default = mijnafvalwijzer) either choose mijnafvalwijzer or afvalstoffendienstkalender
provider: mijnafvalwijzer # (required, default = mijnafvalwijzer) either choose mijnafvalwijzer, rova or afvalstoffendienstkalender
postal_code: 1111AA # (required, default = '')
street_number: 11 # (required, default = '')
suffix: A # (optional, default = '')
Expand All @@ -18,7 +18,7 @@
```yaml
sensor:
- platform: afvalwijzer
provider: mijnafvalwijzer # (required, default = mijnafvalwijzer) either choose mijnafvalwijzer or afvalstoffendienstkalender
provider: mijnafvalwijzer # (required, default = mijnafvalwijzer) either choose mijnafvalwijzer, rova or afvalstoffendienstkalender
api_token: None # (required, default = '') KEY REQUIRED BUT CANNOT BE OBTAINED!!!
postal_code: 1111AA # (required, default = '')
street_number: 11 # (required, default = '')
Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/)
[![Open Source Love png1](https://badges.frapsoft.com/os/v1/open-source.png?v=103)](https://github.com/ellerbrock/open-source-badges/)

_Component to integrate with [afvalwijzer][afvalwijzer] and [afvalstoffendienstkalender][afvalstoffendienstkalender]._
_Component to integrate with [mijnafvalwijzer][mijnafvalwijzer], [rova][rova] and [afvalstoffendienstkalender][afvalstoffendienstkalender]._

This custom component dynamically creates sensor.afvalwijzer_* items. For me personally the items created are gft, restafval, papier, pmd and kerstbomen. Look in the states overview in the developer tools in Home Assistant what the sensor names for your region are and modify where necessary.

Expand All @@ -17,7 +17,7 @@ Special thanks go out to https://github.com/heyajohnny/afvalinfo for allowing me

Platform | Description
-- | --
`sensor` | Show waste pickup dates for mijnafvalwijzer.nl or afvalstoffendienstkalender.nl.
`sensor` | Show waste pickup dates for mijnafvalwijzer.nl, rova.nl or afvalstoffendienstkalender.nl.

![example][exampleimg1]

Expand Down Expand Up @@ -81,7 +81,7 @@ Here's an example of my own Home Asisstant config: https://github.com/xirixiz/ho
```yaml
sensor:
- platform: afvalwijzer
provider: mijnafvalwijzer # (required, default = mijnafvalwijzer) either choose mijnafvalwijzer or afvalstoffendienstkalender
provider: mijnafvalwijzer # (required, default = mijnafvalwijzer) either choose mijnafvalwijzer, rova or afvalstoffendienstkalender
postal_code: 1111AA # (required, default = '')
street_number: 11 # (required, default = '')
suffix: A # (optional, default = '')
Expand All @@ -94,7 +94,7 @@ Here's an example of my own Home Asisstant config: https://github.com/xirixiz/ho
```yaml
sensor:
- platform: afvalwijzer
provider: mijnafvalwijzer # (required, default = mijnafvalwijzer) either choose mijnafvalwijzer or afvalstoffendienstkalender
provider: mijnafvalwijzer # (required, default = mijnafvalwijzer) either choose mijnafvalwijzer, rova or afvalstoffendienstkalender
api_token: None # (required, default = '') KEY REQUIRED BUT CANNOT BE OBTAINED!!!
postal_code: 1111AA # (required, default = '')
street_number: 11 # (required, default = '')
Expand Down Expand Up @@ -176,7 +176,8 @@ automation:
[exampleimg2]: afvalwijzer_lovelace.png
[buymecoffee]: https://www.buymeacoffee.com/xirixiz
[buymecoffeebedge]: https://camo.githubusercontent.com/cd005dca0ef55d7725912ec03a936d3a7c8de5b5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6275792532306d6525323061253230636f666665652d646f6e6174652d79656c6c6f772e737667
[afvalwijzer]: https://mijnafvalwijzer.nl
[afvalstoffendienstkalender]: http://afvalstoffendienstkalender.nl
[mijnafvalwijzer]: https://mijnafvalwijzer.nl
[rova]: https://rova.nl
[afvalstoffendienstkalender]: https://afvalstoffendienstkalender.nl
[customupdater]: https://github.com/custom-components/custom_updater
[customupdaterbadge]: https://img.shields.io/badge/custom__updater-true-success.svg
5 changes: 3 additions & 2 deletions custom_components/afvalwijzer/const/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
from datetime import timedelta

SENSOR_PROVIDER_TO_URL = {
"mijnafvalwijzer_scraper": ["https://www.{0}.nl/nl/{1}/{2}/{3}/"],
"mijnafvalwijzer_api": [
"afvalwijzer_scraper": ["https://www.{0}.nl/nl/{1}/{2}/{3}/"],
"afvalwijzer_scraper_rova": ["https://inzamelkalender.{0}.nl/nl/{1}/{2}/{3}/"],
"afvalwijzer_api": [
"https://api.{0}.nl/webservices/appsinput/?apikey={1}&method=postcodecheck&postcode={2}&street=&huisnummer={3}&toevoeging={4}&app_name=afvalwijzer&platform=phone&afvaldata={5}&langs=nl"
],
}
Expand Down
312 changes: 0 additions & 312 deletions custom_components/afvalwijzer/provider/mijnafvalwijzer.py

This file was deleted.

Loading

0 comments on commit 4e5f175

Please sign in to comment.