AppDaemon Q&A

yea there are a few issues with dashboard that I haven’t gotten back to. It works, but doesn’t display some of the things the way I want them displayed. The bug hasn’t bitten me to figure them out over there yet.

But back to this topic. I have a AD app that will take a list of items from the AppDaemon config file as parameters that are the types of alerts we are interested in (so it’s configurable). It then scrolls through any alerts out there and for the ones we are interested in, it currently displays them to the log, although from there we could dump the to speech, or to a control in HA.

Sound like what we want?

another thing I found that might help. In addition to the alert type, there is a significance field that could be leveraged as well.

W Warning
A Watch
Y Advisory
S Statement
F Forecast
O Outlook
N Synopsis

Nice, this is good information but HA component is not capturing this information so it will not be available to HA or AD.
May be we can put feature request for this. Here is the link to that PDF file from Weather Underground which shows details about this significance field.

http://www.nws.noaa.gov/os/vtec/pdfs/VTEC_explanation6.pdf

If you don’t mind sharing that AD app will be nice.
Thanks

Ok, still working on it. Trying to make sure it doesn’t duplicate alerts now and need to set up callback to repeat checks every so often.

The problem is that WeatherUnderground doesn’t give the alerts a unique key. So I have to generate a repeatable unique key for each alert, build a list of the ones I have reported, and then clean it up after the alerts expire so you don’t get alerted for the same thing multiple times. Maintaining that list is giving me a little trouble at the moment. It’s the whole list/dictionary thing. I sure miss arrays. LOL

Oh man, looks like big efforts, appreciate it but hope you are not just doing for me. I can come up something @ReneTode showed or even have custom component to get additional attributes for pws_alerts sensor to make it little more easy.
Thanks

1 Like

Give this a try.

and you may also want this as a test file. You can just change the LOGLEVEL variable to “DEBUG” to use it instead of querying weather underground.

1 Like

Not so much a big effort. Fun mostly. Our site at work is being closed later this year. As a result, there aren’t many (any) projects going on, so I have a lot of free time. This was in line with something I was doing, and it sounded fun. And it was right, it was. :slight_smile: Let me know what else you want it to do, or whatever changes you like and we can make it happen.

Wow! that was really nice work and very involving time and efforts wise. I really appreciate it and thank you so much.
There were few hiccups but I made it. The class name “weatheralert” vs “weatherAlert” was one of issue, capital vs small ‘a’. Other then that I have module name given different. But everything is working now in debug mode with the json you provided and I see two alerts in my HA. Nice.
I will have some modifications to fit my need to do audio notifications.
One more time appreciate your help and lots of time plus efforts.
Thanks

Below are the screenshots of those two persistent notification alerts from your app.

One other note, I just thought of. If you are in europe, there may be slightly different information coming from weatherunderground. Check the page I sent earlier and there is a link at the bottom showing the json output for US and one for europe. I’ll see if I can do anything to make it a little smarter and adjust based on where you are.

oh and you will want to change your weatherunderground key and location information at the top. I need to move that to the config too I guess.

Ok there is a new version out there that I think handles europe. Also it handles an error condition this morning where for some reason there is a header coming from weatherunderground without any alert data. Yesterday the alerts key was just “”, today it’s not there.
Look at the head ing about how to setup your AppDaemon config file now. If you are in europe you use your zmw whatever that is. The location line is going to be interpreted as a dictionary so it’s
location={“zmw”:“whatever”}
Give it a try and let me know what blows up and I’ll fix it.

This looks awesome!!! Can’t wait to try this out!

Is there a guide (for dumb newbs that have done HASS AIO in virtual environment) ) about how to install Appdaemon?

I installed mine in my /home/pi directory using the normal instructions in the repo and it works fine.

Some of the more experienced AD users can check in though and tell you if there is a better way.

so yours is in
/home/pi/appdaemon

correct?

Mine too but is not working (I do need a very dumb newb guide …)

Yep. Can you be more specific about what isn’t working? Are you getting any errors, etc?

sorry read it wrong

you probably didnt install correct.

did you do:

sudo pip3 install .

and notice the dot at the end!!

@aimc Once again, thanks a lot for AppDaemon! It’s awesome.

Do you have any plans to implement a transition parameter for the turn_off method, if the given entity is a light, just like the native HASS service? Right now I’m doing a pretty hack-y work-around:

if device == "light":
         self.turn_on(self.entity, transition = 30, brightness = 0)
         time.sleep(30)
         self.turn_off(self.entity)
else:
         self.turn_off(self.args["entity"])