Skip to content

Commit

Permalink
fix error handling mijnafvalwijzer
Browse files Browse the repository at this point in the history
  • Loading branch information
Bram van Dartel authored and github-actions[bot] committed Oct 22, 2022
1 parent fa848e6 commit 0a0a32c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion custom_components/afvalwijzer/collector/mijnafvalwijzer.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from datetime import datetime, timedelta
import sys

import requests
import sys

from ..common.day_sensor_data import DaySensorData
from ..common.next_sensor_data import NextSensorData
Expand Down Expand Up @@ -56,6 +56,7 @@ def __init__(

def excepthook(type, value, traceback):
_LOGGER.error(value)

sys.excepthook = excepthook

def get_waste_data_provider(self):
Expand Down
2 changes: 1 addition & 1 deletion custom_components/afvalwijzer/const/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

SENSOR_COLLECTOR_TO_URL = {
"afvalwijzer_data_default": [
"https://api.{0}.nl/webservices/appsinput/?apikey=5ef443e778f41c4f75c69459eea6e6ae0c2d92de729aa0fc61653815fbd6a8ca&method=postcodecheck&postcode={1}&street=&huisnummer={2}&toevoeging={3}&app_name=afvalwijzer&platform=phone&afvaldata={4}&langs=nl&"
"https://api.{0}.nl/webservices/appsinput/?apikey=5ef443e778f41c4f75c69459eea6e6ae0c2d92de729aa0fc61653815fbd6a8ca&method=postcodecheck&postcode={1}&street=&huisnummer={2}&toevoeging={3}&app_name=afvalwijzer&platform=web&afvaldata={4}&langs=nl&"
],
"afvalstoffendienstkalender": [
"https://{0}.afvalstoffendienstkalender.nl/nl/{1}/{2}/"
Expand Down
8 changes: 4 additions & 4 deletions custom_components/afvalwijzer/test/test_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@
# street_number = "1"

# RD4
#provider = "rd4"
#postal_code = "6301ET"
#street_number = "24"
#suffix = "C"
# provider = "rd4"
# postal_code = "6301ET"
# street_number = "24"
# suffix = "C"

# Icalendar
# provider = "eemsdelta"
Expand Down

0 comments on commit 0a0a32c

Please sign in to comment.