Hey,
strange problem, maybe I need some math lessons.
When i try to calculate some cos… there is something wrong.
This
var Number SunAngle = SunElevation.state as Number
logInfo("SundAngle", SunAngle + "")
SunAngle = Math::cos(SunAngle.doubleValue())
logInfo("Cos SunAngle", SunAngle + "")
gives as a Result:
2025-07-01 20:11:43.508 [INFO ] [.openhab.core.model.script.SundAngle] - 10.413343240575136
2025-07-01 20:11:43.509 [INFO ] [enhab.core.model.script.Cos SunAngle] - -0.5498887588069448
Sun Elevation is from the Astro Binding.
cos(10) should not be under zero…
Best Regars
Alex