School time start and finish per weekday, contributed by @grifmo (#179), plus a targeting fix that came with it. Update through HACS and restart.
Added
- School time start and finish (#179, thanks to @grifmo). A new
familylink.set_school_timeaction edits the weekly school time window of a weekday (scope: weekly, the default), or posts a window for today only (scope: today) without touching the weekly schedule. Newtime.<child>_<weekday>_school_time_startand_school_time_endentities read the weekly school time schedule and write it back, like the bedtime ones; they are unavailable for a weekday that has no school time window in Family Link. The weekly write reuses thetimeLimit:updatecall ofset_bedtime, pointed at the day's school time slot; the today write is the type-9 overrideenable_school_timealready posts, with the chosen window. Verified on a live account: the slot lands and reads back, and a window Google refuses (for example one overlapping another slot of the same day) raises an error the automation can catch. A typical use is following a school timetable, for instance from the WebUntis integration; see SERVICES.md.
Fixed
- Actions called with a child-level entity acted on the first child (#179). The child's bedtime, school time and daily limit switches carry no
child_idattribute, soenable_school_time,disable_school_time,enable_bedtimeand the other actions given such anentity_idsilently fell back to the first supervised child. The child is now taken from the Family Link device the entity belongs to when the attribute is missing.
Notes
- A weekday with two school time windows exposes the first one only in the new time entities, as the bedtime entities do.
- Recent Home Assistant versions build the id of a newly created entity from its device's area as well, so the new time entities may come out as
time.<area>_<child>_…. The display names are unchanged.