nextSunrise = indigo.server.calculateSunrise()
indigo.variable.updateValue(SUNRISEVARIDHERE, value=nextSunrise.strftime("%H:%M"))
nextSunset = indigo.server.calculateSunset()
indigo.variable.updateValue(SUNSETVARIDHERE, value= nextSunset.strftime("%H:%M"))
jay (support) wrote:Another benefit to scripting in Python - use IDs rather than names so you can change names without breaking scripts...
- Code: Select all
nextSunrise = indigo.server.calculateSunrise()
indigo.variable.updateValue(SUNRISEVARIDHERE, value=nextSunrise.strftime("%H:%M")
nextSunset = indigo.server.calculateSunset()
indigo.variable.updateValue(SUNSETVARIDHERE, value= nextSunset.strftime("%H:%M")
Sets each value to HH:MM sunrise/sunset.
nextSunset = indigo.server.calculateSunset()
Invalid syntax
Users browsing this forum: No registered users and 9 guests