(Python):def set_rising_sun( country, countryId, settingId ): ... if OK: import weather weather.SetProperty( "Current.Locale.Sunrise", weather.SUN_UP ) weather.SetProperty( "Current.Locale.Sunset", weather.SUN_DOWN ) weather.SetProperty( "Current.Locale.Sunlength", weather.SUN_LENGTH ) return OK
(Python): # Retrieve sunrise and sunset, day length and day length difference html_11 = get_html_source( countryId, 11)
(Python): #( Date, Sunrise, Sunset, Length of day, Length of day difference, Solar noon time, Altitude, Distance ) # Usefull only in mode 4 Sunrise-Sunset if mode == 4: # Retrieve sunrise and sunset, day length and day length difference html_11 = get_html_source( countryId, 11)
(Python):if OK: xbmc.executebuiltin( "RunScript(special://home/addons/weather.google/resources/lib/weather.py)" )
(Python):NantesSUN { "Current.AstroTwilight.End": "19:57", "Current.AstroTwilight.Start": "6:44", "Current.CivilTwilight.End": "18:45", "Current.CivilTwilight.Start": "7:56", "Current.NauticTwilight.End": "19:21", "Current.NauticTwilight.Start": "7:20", "Current.Solarnoon.Altitude": "26.5", "Current.Solarnoon.Distance": "147.460", "Current.Solarnoon.Time": "13:20", "Current.Sun.Diff": "+ 2m 53s", "Current.Sun.Length": "9h 43m 12s", "Current.Sunrise": "8:29", "Current.Sunrise.Azimuth": "114", "Current.Sunset": "18:12", "Current.Sunset.Azimuth": "247", "In.Broad.Daylight": true}MOON { "Current.Moon.Meridian.Altitude": "62.8", "Current.Moon.Meridian.Distance": "389,157", "Current.Moon.Meridian.Illuminated": "89.8%", "Current.Moon.Meridian.Time": "22:44", "Current.Moon.Phase": "", "Current.Moonrise": "14:47", "Current.Moonrise.Azimuth": "57", "Current.Moonset": "5:51", "Current.Moonset.Azimuth": "303"}---------------------------------------------------------------------------------------------------->>> BrestSUN { "Current.AstroTwilight.End": "20:08", "Current.AstroTwilight.Start": "6:56", "Current.CivilTwilight.End": "18:54", "Current.CivilTwilight.Start": "8:10", "Current.NauticTwilight.End": "19:31", "Current.NauticTwilight.Start": "7:33", "Current.Solarnoon.Altitude": "25.3", "Current.Solarnoon.Distance": "147.460", "Current.Solarnoon.Time": "13:32", "Current.Sun.Diff": "+ 3m 01s", "Current.Sun.Length": "9h 37m 12s", "Current.Sunrise": "8:44", "Current.Sunrise.Azimuth": "114", "Current.Sunset": "18:21", "Current.Sunset.Azimuth": "246", "In.Broad.Daylight": true}MOON { "Current.Moon.Meridian.Altitude": "61.6", "Current.Moon.Meridian.Distance": "389,116", "Current.Moon.Meridian.Illuminated": "89.9%", "Current.Moon.Meridian.Time": "22:56", "Current.Moon.Phase": "", "Current.Moonrise": "14:55", "Current.Moonrise.Azimuth": "57", "Current.Moonset": "6:08", "Current.Moonset.Azimuth": "304"}