Skip to content

Commit

Permalink
Remove useless variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
denpamusic authored Oct 6, 2023
1 parent dd07657 commit b670584
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions custom_components/plum_ecomax/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,15 +246,15 @@ async def async_get_schedule_service(service_call: ServiceCall) -> ServiceRespon
schedule = schedules[schedule_type]
schedule_day = getattr(schedule, weekday)
start_of_day_dt = dt.datetime.strptime(START_OF_DAY, TIME_FORMAT)
intervals = {
(start_of_day_dt + dt.timedelta(minutes=30 * index)).strftime(
TIME_FORMAT
): value
for index, value in enumerate(schedule_day.intervals)
return {
"schedule": {
(start_of_day_dt + dt.timedelta(minutes=30 * index)).strftime(
TIME_FORMAT
): value
for index, value in enumerate(schedule_day.intervals)
}
}

return {"schedule": intervals}

raise HomeAssistantError(
f"{schedule_type} schedule is not supported by the device, check logs for more info"
)
Expand Down

0 comments on commit b670584

Please sign in to comment.