I’ve been working a bit more on my automations recently and I was kinda bugged by my haveibeenpwned automations. Essentially i use a crapload of e-mailadresses (i won’t bore you with the details).
So I have two problems:
I have to do automation for each one of them (my templating skills suck)
I cant get the breach attribute out due to a space in the attribute name
I like your idea and the simplicity,
on the other hand, you always would ahve to adjust your script after there is a new breach detected. A lazy programmer is a good programmer
I guess my other question is answered: space in a attribute name means you have to use the underscore.
I’ll have to change like a billion passwords for each email address anyway, changing the number to 1 for the affected address is not that much extra work tbh
Anyone else having trouble with this sensor on 0.67.0?
2018-04-15 15:51:00 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform haveibeenpwned Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 82, in async_setup SLOW_SETUP_MAX_WAIT, loop=hass.loop) File "/usr/lib/python3.6/asyncio/tasks.py", line 358, in wait_for return fut.result() File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run result = self.fn(*self.args, **self.kwargs) File "/usr/lib/python3.6/site-packages/homeassistant/components/sensor/haveibeenpwned.py", line 53, in setup_platform sensor.update_nothrottle() File "/usr/lib/python3.6/site-packages/homeassistant/components/sensor/haveibeenpwned.py", line 116, in update_nothrottle self.schedule_update_ha_state() File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 294, in schedule_update_ha_state self.hass.add_job(self.async_update_ha_state(force_refresh)) AttributeError: 'NoneType' object has no attribute 'add_job'
The only thing i dont understand is: {{ trigger.to_state.attributes.friendly_name }}"
It doenst work by just adding it. Can you explain the extra steps to get it working? Or should it just work?
Yeah, should just dump the friendly_name for the sensor that triggered the automation in to the text, no magic.
Not sure why it wouldn’t be working for you.
I presume you’re testing by changing the logic of the trigger, rather than manually triggering it? Obviously the latter won’t have anything to put in the template.
What format do you have in your secrets file for: “haveibeenpwned_email” (as referenced in the sensor definition)
I assume it is multiple entities? (please change the actual addresses)