[BETA] Horoscope Generator

Hello! I've had my hubitat about a week now and loving the potential. I come from a long background of coding wordpress and php, with a little javscript here and there. I'm certainly struggling to learn groovy, and find the documentation a bit challenging at times.

However, I've muddled my way through my first coding endeavor. This is a driver which simply generates a new horoscope message of the day. It has a few other attributes returned from the API, and schedules a cron to run once a day at midnight to get new data.

I have two questions which I'm still unsure.

  1. Is it possible to subscribe to event changes from a driver? Or does it have to be from an app?
  2. On this horoscope driver, when editing the device, I click save preferences. But the attributes on the page do not update until a second page reload. The dashboard tile updates immediately. Is this normal behavior to need a second page reload of the device to see the updated results?

I certainly welcome any constructive criticism.

2 Likes
  1. Apps only.
  2. Device page does not auto refresh.
1 Like

!) I figured, thank you.
2) It's funny, because I click save, the page reloads, and for a brief second the attributes show the correct values, then are overwritten with the older results. On a second reload, the updated results display correctly.

Great app idea! Horoscopes and biorhythms were the very first thing I programmed into my Hewlett-Packard 10C pocket calculator over 40 years ago, and (from a mathematical point of view, anyway) they still hold my interest.

Can't wait to see what you release. I'm already planning to include it on a "Wellness Chart" that I have in mind for my next dashboard project. :slight_smile:

1 Like

Which web browser are you using? Sounds like a caching issue.

Thank you, thank you. Love the username.. appropriate! Yes, love how mathematics and astronomy/astrology work together. I was browsing free api's, and thought this would be a nice crash course into the groovy programming. I'll definitely have to learn apps next. Thanks for the kind words, be well, and hope to cross paths again soon!

1 Like

Hmm... could be. My software dev buddies make fun of me for using "Opera". I say, if it works in Opera, chances are 99% it'll work in other browsers.

That's a good idea. I'll try other browsers to see.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.