mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-12 06:44:04 +02:00
pylint fix
This commit is contained in:
parent
02923a3c9e
commit
95823576ea
1 changed files with 3 additions and 3 deletions
|
|
@ -366,9 +366,9 @@ class AdaptiveSwitch(SwitchEntity, RestoreEntity):
|
|||
def _get_sun_events(self, date):
|
||||
def _replace_time(date, key):
|
||||
time = getattr(self, f"_{key}_time")
|
||||
dt = datetime.datetime.combine(datetime.date.today(), time)
|
||||
tz = self.hass.config.time_zone
|
||||
utc_time = tz.localize(dt).astimezone(dt_util.UTC)
|
||||
date_time = datetime.datetime.combine(datetime.date.today(), time)
|
||||
time_zone = self.hass.config.time_zone
|
||||
utc_time = time_zone.localize(date_time).astimezone(dt_util.UTC)
|
||||
return date.replace(
|
||||
hour=utc_time.hour,
|
||||
minute=utc_time.minute,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue