Set Lyric hold time to use local time instead of utc (#48994)

pull/49030/head
Aidan Timson 2021-04-10 20:48:33 +01:00 committed by GitHub
parent e1d4d65ac4
commit 3cd40ac79c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@
from __future__ import annotations
import logging
from time import gmtime, strftime, time
from time import localtime, strftime, time
from aiolyric.objects.device import LyricDevice
from aiolyric.objects.location import LyricLocation
@ -82,7 +82,7 @@ SCHEMA_HOLD_TIME = {
vol.Required(ATTR_TIME_PERIOD, default="01:00:00"): vol.All(
cv.time_period,
cv.positive_timedelta,
lambda td: strftime("%H:%M:%S", gmtime(time() + td.total_seconds())),
lambda td: strftime("%H:%M:%S", localtime(time() + td.total_seconds())),
)
}