The helper method needs some enhancements to support Home Assistant services for setting a new time slot from scratch and insert a time slot.
When inserting, the adjacent time slots needs to be adjusted with their start and end times.
Overlapped slots will be removed.
Furthermore the current slot parameter modifications needed enhancements to create new slots when the current time falls into a gap in the schedule.
The method was also enhanced to copy and modify an existing time slots instead of creating a new one from scratch to avoid mismatch of timeslot names, which are set by the Anker App and is different per used app language.
A new slot from scratch is only created when the schedule is completely empty, which can happen when wrong schedule structure is sent to the Api.
The helper method needs some enhancements to support Home Assistant services for setting a new time slot from scratch and insert a time slot. When inserting, the adjacent time slots needs to be adjusted with their start and end times. Overlapped slots will be removed.
Furthermore the current slot parameter modifications needed enhancements to create new slots when the current time falls into a gap in the schedule. The method was also enhanced to copy and modify an existing time slots instead of creating a new one from scratch to avoid mismatch of timeslot names, which are set by the Anker App and is different per used app language. A new slot from scratch is only created when the schedule is completely empty, which can happen when wrong schedule structure is sent to the Api.