Restore Expected Behavior of Sonarr Upcoming Sensor (#34408)

This commit is contained in:
Chris Talkington 2020-04-24 12:09:38 -05:00 committed by GitHub
parent a2fab264c4
commit 1d22936a82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -206,7 +206,8 @@ class SonarrSensor(Entity):
def update(self):
"""Update the data for the sensor."""
start = dt_util.utcnow().replace(microsecond=0)
local = dt_util.start_of_local_day().replace(microsecond=0)
start = dt_util.as_utc(local)
end = start + timedelta(days=self.days)
try:
res = requests.get(