Kodi Community Forum

Full Version: Any way to show a different icon if day or night?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi Guys,

I'm trying to come up with a way to show a weather icon with a daytime or a night time background depending on the current time. The solution I thought had the best chance of success was to set an alarm in a onload tag in startup.xml to set a skin boolean to true if time was between sun rise and sunset. I can see a number of way that this could fail, so would not be certain I was on the right track unless I managed to get it to work the first time.

So, a couple of questions.

Is the AlarmClock function just restricted to time elapsed or can you get it to trigger at a particular time,?

If you can set a particular time, what is the correct format for the command as the wiki appears a little vague on the details?

Is there some hidden info string or some such that I can use to obtain the current local sunrise and sunset times or would I just have to assume 6am sunrise and 6pm sunset?

And most importantly, has anyone managed to achieve something similar, and if so how?

Wyrm (AppTV)

or depending on your weather addon


Overthinking things as usual, thanks that would be a lot simpler. Do you know if I could use a $VAR for starttime, endtime as that would allow me to use Today.Sunrise if available otherwise just use 06:00 if not?

Ta Wyrm
I don't, sorry.

Thanks mate, have been testing over the last few days to make sure was working. System.Time was the goods. Don’t know if you can use $VAR as parameters as turns out I was already using a $VAR to display the icon (allows the user to change default icon). Just added additional lines to my existing $VAR to handle the situation of alternative sunrise/sunset times being available.

Once again, thanks for the help.
No problem - last time I used this was for XeeBo.