I feel like I’m a little confused about how to use the new Alert component. I understand what it does, and really like it for problematic issues, like the example of a low battery reminder. I even went as far as implementing a few alerts already.
After creating a low battery alert and restarting, i get a new alert entity, which makes sense. But where would that be displayed, when it does trigger?
Here’s what the new component looks like:
> alert.motionlow_batt idle hidden: true
> friendly_name: Motion Sensor battery low
So would I include “alert.motionlow_batt” somewhere in my groups or views?
I understand it’s not going to display anything right now, because it’s idle, and in a hidden state. But when it’s active, and hidden: false, where will it pop up in the UI? Especially if it’s not defined in my groups or views?
Anyways, a little clarification would be nice. Thanks!
Unfortunately you didn’t mark your component block as code, so the formatting was lost. It does look however like it may be missing the entity that’s being monitored, and the notifier to use. See this thread for another discussion.
You’ll then need to add it to a group that’s displayed, so that when triggered it’s visible. If you use a customised default view, and don’t add it to any group or view, it’ll never be visible.
Also missing the notifier, which is where you will get your alerts. Nothing will display in the UI; all alerts are sent to whatever notification platform you specify in the alert setup.
I think I accidently confused you guys, my initial post didn’t list the actual alert code from the yaml file. But instead listed the resulting alert component (entity ID) from the UI.
My question is. Do I need to include “alert.motion_lowbatt” in a group/view in my groups.yaml file, so it gets displayed in my UI? How is this particular alert acknowledge-able?
I created another test alert from the same alert code above, but for the entity_id of a door (something I could control). When I opened the door, I got an alert via pushover, as expected, but I didn’t see anything in the UI related to it.
The documentation on the component page specifically states: Alerts will add an entity to the front end only when they are firing. This entity allows you to silence an alert until it is resolved.
Should I of seen anything in the UI? How can I acknowledge the alert? If they do pop up in the UI, is there a way to specify where they will pop up?
Yes, if you want to be able to acknowledge and disable it. Basically they’ll be hidden by default, as it shows in the bit you posted (well, they will be probably once 0.38.4 comes out, since there’s a bug that means they’re not hidden currently).
Once you do that, you’ll see them in the relevant view. Just keep in mind that once you customise the default view, nothing is displayed unless you’ve explicitly added it to a visible group.
Thanks @Tinkerer that’s what I was wondering. I’m aware that once i customize the default view nothing is displayed unless I explicitly add it.
So I’ve added “alert.motion_lowbatt” to a new group called “alerts”, then put that group into a view called “security”.
Currently if I open up the UI, and look at the “security” view, I see the group labeled “Alerts”, with the entry “Motion Sensor battery low” in a state of “on”. But if I go to Dev tools / States the entity “alert.motion_lowbatt” is in the state of “idle”, not “on”. I’d think if it was idle, the state would be off, not on… Is this the bug you were talking about?
Sadly I’m not the feature dev, or any other kind of dev, so I can’t help with bugs. I’ve just got lots of experience of narrowing down the causes of problems
I’d check the logs to see that it’s not firing in between. If it isn’t, I’d raise an issue with a summary of the problem, the version of HA you’ve installed (and how), your alert configuration and the relevant lines from the log.
If it is firing between, then it sounds like a notifier issue.