Skip to content

Commit 2e4838b

Browse files
committed
Fix day shift
1 parent dac0ae9 commit 2e4838b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

weather/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ def __get_current_sunrise_sunset(self, next=False):
166166
shift_days = int((datetime.now() - self._device["forecast"][today_index]["sun"]["rise"]).days)
167167
if not next:
168168
return {
169-
"sunrise": self._device["forecast"][today_index]["sun"]["rise"] - timedelta(days=shift_days),
170-
"sunset": self._device["forecast"][today_index]["sun"]["set"] - timedelta(days=shift_days),
169+
"sunrise": self._device["forecast"][today_index]["sun"]["rise"] + timedelta(days=shift_days),
170+
"sunset": self._device["forecast"][today_index]["sun"]["set"] + timedelta(days=shift_days),
171171
}
172172

173173
next = False

0 commit comments

Comments
 (0)