Hi Ewan, I think that’s the only widget where I only copy-pasted the code from this great community
I use this version:
The whole code without persistence and timezone corrected
You will need the Astral library (pip install Astral) and the pytz library (sudo pip install pytz)
svg generated is in the shared html folder
from __future__ import print_function
import math
# import time
from datetime import datetime, timedelta, date, time
import sys
import pytz
from astral import Astral
from astral import Location
from myopenhab import openhab
from myopenhab import mapValues
from myopenhab import getJSONValue
WI…
And the code for the template widget is:
<object data="/static/shaddow.svg?{{itemValue('Sun_Azimuth')}}" type="image/svg+xml"></object>
I think the important part for the update is the “?{{…}}” => do have that one in your widget? And is the name of the item correct?
I think, if we need futher debugging, we should switch to the Sun-Position-SVG-Thread…