diff --git a/bundles/org.openhab.binding.astro/src/main/java/org/openhab/binding/astro/internal/calc/MoonCalc.java b/bundles/org.openhab.binding.astro/src/main/java/org/openhab/binding/astro/internal/calc/MoonCalc.java index b20a60148d51c..0cde817c1924c 100644 --- a/bundles/org.openhab.binding.astro/src/main/java/org/openhab/binding/astro/internal/calc/MoonCalc.java +++ b/bundles/org.openhab.binding.astro/src/main/java/org/openhab/binding/astro/internal/calc/MoonCalc.java @@ -121,7 +121,7 @@ private void setMoonPhase(Calendar calendar, Moon moon) { double julianDateEndOfDay = DateTimeUtils.endOfDayDateToJulianDate(calendar); double parentNewMoon = getPreviousPhase(calendar, julianDateEndOfDay, NEW_MOON); double age = Math.abs(parentNewMoon - julianDateEndOfDay); - phase.setAge((int) age); + phase.setAge(age); long parentNewMoonMillis = DateTimeUtils.toCalendar(parentNewMoon).getTimeInMillis(); long ageRangeTimeMillis = phase.getNew().getTimeInMillis() - parentNewMoonMillis; diff --git a/bundles/org.openhab.binding.astro/src/main/java/org/openhab/binding/astro/internal/model/MoonPhase.java b/bundles/org.openhab.binding.astro/src/main/java/org/openhab/binding/astro/internal/model/MoonPhase.java index 435c77918498a..2787c5afe7c46 100644 --- a/bundles/org.openhab.binding.astro/src/main/java/org/openhab/binding/astro/internal/model/MoonPhase.java +++ b/bundles/org.openhab.binding.astro/src/main/java/org/openhab/binding/astro/internal/model/MoonPhase.java @@ -32,7 +32,7 @@ public class MoonPhase { private Calendar full; private Calendar thirdQuarter; private Calendar _new; - private int age; + private double age; private double illumination; private double agePercent; private double ageDegree; @@ -105,7 +105,7 @@ public QuantityType