Has somebody an idea. Have this error for two sensors:
One trash_restafval and the trash_papier
Update for sensor.trash_restafval_formatted fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 261, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 439, in async_device_update
await self.async_update()
File "/usr/src/homeassistant/homeassistant/components/template/sensor.py", line 238, in async_update
self._state = self._template.async_render()
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 215, in async_render
return compiled.render(kwargs).strip()
File "/usr/local/lib/python3.7/site-packages/jinja2/asyncsupport.py", line 76, in render
return original_render(self, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 1008, in render
return self.environment.handle_exception(exc_info, True)
File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.7/site-packages/jinja2/_compat.py", line 37, in reraise
raise value.with_traceback(tb)
File "<template>", line 1, in top-level template code
File "/usr/local/lib/python3.7/site-packages/jinja2/sandbox.py", line 438, in call
return __context.call(__obj, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 805, in strptime
return datetime.strptime(string, fmt)
TypeError: strptime() argument 1 must be str, not Undefined
like to post an update to the lovelace card I made, which makes the entity_picture cards ‘blink’ when today or tomorrow 's trash is active, (and a persistent notification has ben made, and the trash hasn’t been moved outside yet) (or the input_boolean hasn’t been switched (which dismisses the persistent notification in my setup):
commented is another way to draw attention: wiggle the picture-entity, which is also nice
for completenes’s sake, and because I use a different automation logic than @xirixiz’s repo Ill share these below too:
I guess the data you receive doesn’t have any value. Maybe I should build in some verification as more people tend to have this in the past. However, could you run HASS in de debug mode for the custom_component? Can you see data when you logon to mijnafvalwijzer.nl?
@xirixiz The sensors don 't get an value I guess. Because for paper afvalwijzer uses opk. And for restafval we don 't use the grey trash. Think that’s a problem.
But Let me check to debug mode when i’m at home.
@silver323 Then that’s the problem most probably. Unfortunatly mijnafvalwijzer doesn’t use a naming convention, so sensors are being populated based on the name mijnafvalwijzer returns from the api call. You need to check which sensors are being populated in HASS and use that name.
Now I removed the two sensor that where not in use. Not getting the errors anymore. So only the sensors thats getting information are left in the files.
added another nicety for the afvalwijzer setup: a simple button to confirm the trash has been moved outside (after a persistent notification has been made to do so). This button works for both todays and tomorrows notification. And is in fact a substitute in the frontend for dismissing the notification and blink/wiggle by acting upon the iOS notification, which does the same:
tap the button , and navigate to the page with the other afvalwijzer card(s), hold it and dismiss. Purposely used this and not vice versa to prevent accidental dismissing.
of course you can change to your liking, just thought Id share
I’ve decided to give it another shot and integrate mijnafvalwijzer with hass. Anyone like to contribute? I’m more of an advanced scripter rather than a programmer, so I could use some help from a programmer…
I tried again, but still not attached together .
Did you try the code within the yaml itself, or in de raw UI editor ? it seems to be that the custom card isn’t recognized correctely
All, I decided to stop improving this component. I’ve created a python library which can be used, and maybe someone else can create a new component to use with HASS. I really liked HASS but, but I decided to go with a more mature (payed) platform. I faced to many issues with for example my Philips HUE setup and I really like things just to work instead of reparing it often.
o that’s too bad really, sorry to hear you say that.
Really enjoying the component as it is today, it is one of the more helpful ones in the setup!
As for Hue: ever since upgrading to I think 101 + there have been no more issues in 3 of my HA instances. (and I was one of the heavy posters on the various issues…)
Hue has been rock solid, even with the Hue custom component installed. And I have a lot of customized entities, and control the Hue api from within HA by means of several very complex scripts and automations. I can set all thresholds, schedules etcetera. No errors at all…
So if you need some Hue assistance, don’t hold back.
And, as expressed many times before: thanks for the CC!
Hopefully there somebody who’s going to pickup the development of this add-on ! For now : thnx for this nice one and the development time you’re spending till now
should be true today, but shows False… apparently the platform or the webpage /api have changed? @xirixiz would you know if mijnafvalwijzer has changed anything??
Kan je eens kijken of de json data bestaat? Ik weet dat het per gemeente anders kan zijn of de data nog beschikbaar is, bij mij werkt het nog naar behoren (ja, ik ben toch weer met HASS begonnen, helemaal clean ). Laatste kans…