pippyn / home-assistant-sensor-ophaalkalender Goto Github PK
View Code? Open in Web Editor NEWDEPRECATED - This sensor is now integrated in Afvalbeheer
License: Apache License 2.0
DEPRECATED - This sensor is now integrated in Afvalbeheer
License: Apache License 2.0
Hi ,
tuinafval results in uknown sensor status. All others work. However, also a minor issue is that PMD results in an other date output than the others. It also gives the weekday.
- platform: ophaalkalender resources: - restafval - tuinafval - papier - pmd postcode: xxxx streetname: xxxx streetnumber: x
Kind Regards,
Robin
I tried to configure it for my postal code 8650 and got a date for paper that's set to december (we're april now)
ophaalkalender restafval
Thursday, 16-04-2020
ophaalkalender papier
24-12-2020
ophaalkalender pmd
24-04-2020
So I have a test Hassio install where I try out new Home Assistant updates and custom components. I recently updated to HA 0.103.5 and installed the Ophaalkalendar component through HACS.
All works fine for my town/street.
So enter my actual Home Assistant install, this is still a Hasbian install - but also on HA 0.103.5. I manually install the custom component but I can't get it to work... always get:
Error occurred while fetching data: SSLError(MaxRetryError('HTTPSConnectionPool(host=\'www.ophaalkalender.be\', port=443): Max retries exceeded with url: /calendar/findstreets/?query=
Of course I first stopped/disabled the component in the Hassio install and also waited several hours to retry in Hasbian.
Opening the website of Ophaalkalender.be directly and entering my street there also just works.
Any tips?
Could you please add the "Gemengde plastics" .
this is a special pick up for the Pink bags that are used for plastic recycling.
Hey there, love the component !
It would be great if you could issue a PR for it to be added to HACS
(https://custom-components.github.io/hacs/developer/include_default_repositories/)
As far as I can see it passes all requirements.
Keep up the great work !
As mentioned before.. LOVE the component, works like a charm !
Now I'm working on a home dashboard and it would be nice to be able to show the words like tomorrow, today, days of the week, .. in dutch..
Even if I set the UI (in user settings) to dutch it stays in english..
Thanks in advance !
Hi there,
great work ! thanks !
I did notice 2 issues:
The resource for "tuinafval" is actualy "groenafval" now, perhaps they changed it?
If i change the date formatting it only works for "grof aval".
# ophaalkalender - afvalkalender
- platform: ophaalkalender
resources:
- restafval
- tuinafval
- groenafval
- papier
- pmd
- grofafval
postcode: 8310
streetname: Astridlaan
streetnumber: 111
dateformat: '%d %b'
#dateonly: 1
Hello,
i just started with Hassio (hassos 3.8 and Home Assistant 0.104.3) and i installed ophaalkalender 1.1.4 via HACS. When i try to set up the sensor in my configuration.yaml i get an "address not found" error in the logs.
2020-01-29 12:14:13 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for ophaalkalender which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2020-01-29 12:14:47 ERROR (SyncWorker_0) [custom_components.ophaalkalender.sensor] Address not found!
The address i'm using is zipcode 9450, Fonteinstraat 13. There is data when i enter this address on the website (https://www.ophaalkalender.be/Calendar).
I tried different formatting for the streetname (lowercase, uppercase, with or without
municipality name between brackets (as the site shows when you select the street name), but i still get this error...
Installed this at the last couple of days of 2019. Seemed to look great to make a new template around and throw away my own written script (yours looks way better written, great job!).
But now I get, on all my services from "Ophaalkalender" the same response... I'm not sure, but it seems this had started after I upgraded HA to 0.103.5?
Thank you in advance!
Update for sensor.ophaalkalender_restafval fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 281, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 461, in async_device_update await self.hass.async_add_executor_job(self.update) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/ophaalkalender/sensor.py", line 196, in update self.data.update() File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 240, in wrapper result = method(*args, **kwargs) File "/config/custom_components/ophaalkalender/sensor.py", line 114, in update response = requests.get(url).json() File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 897, in json return complexjson.loads(self.text, **kwargs) File "/usr/local/lib/python3.7/site-packages/simplejson/__init__.py", line 525, in loads return _default_decoder.decode(s) File "/usr/local/lib/python3.7/site-packages/simplejson/decoder.py", line 370, in decode obj, end = self.raw_decode(s) File "/usr/local/lib/python3.7/site-packages/simplejson/decoder.py", line 400, in raw_decode return self.scan_once(s, idx=_w(s, idx).end()) simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
When adding the following to configuration.yaml HA won't start any more
Any one else this issues? running latest version of HA and latest version of plugin
thanx
Hi,
Since v0.92 this is does not work anymore.
I'm currently running HA v0.93.1
Solution:
Create the following files in [homeassistant]/config/custom_components/ophaalkalender/ :
init.py => """Ophaalkalender component."""
manifest.json =>
{
"domain": "ophaalkalender",
"name": "ophaalkalender",
"documentation": "https://github.com/pippyn/Home-Assistant-Sensor-Ophaalkalender/blob/master/README.md",
"dependencies": [],
"codeowners": [],
"requirements": []
}
Check your config. It should not generate any issues.
Next restart HA and you should see these sensors:
- sensor.ophaalkalender_restafval
- sensor.ophaalkalender_papier
- sensor.ophaalkalender_pmd
Hello pippyn
For 1650 Beersel (at least today) the JSON result coming back from ophaalkalender.be is not sorted chronologically. This results in wrong value in next_collection_date and thus wrong date shown in Home assistant interface
I adapted the code to loop through the whole result and select smallest date >= today instead of breaking on first date found.
I am not very familiar with Github so attaching the fix here below. Maybe it can still be improved but it seems to do the trick for me...
Modification done in "get_next_collection" function
Thanks for this very useful sensor!
Looking at https://www.ophaalkalender.be//api/rides?id=39714&housenumber=1&zipcode=2800, there is a category "Gemengde plastics" that should be considered. I'll try a PR.
sensor:
Could you look into this?
Hi pippyn,
Thank you for making this component and also making the effort to make one for Belgium.
After installing I noticed that the GFT/Tuinafval calendar was nog working so I looked into the sensor.py file and found that the key seems swapped:
changing <'tuinafval': 'gft'> to <'gft': 'tuinafval'> solved the issue for me. I don't know if this will change anything for the dutch version.
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.