If it is really the same every single day, a schedule helper would be a nice visual way to edit the schedule. You can create schedules in the helper section. The state would be on or off for in school or not, It has an attribute, next_event, to show the next change (so start or end of school).
If you want full control, a local calendar would be a great way, you’d have a calendar to define repeating school appointments. Showing the next event would take a bit more work though.
Both would allow for all kinds of automation fun, the second would be able to account for holidays.
yes i’ve looked at both options, but both seem overkill; ideally i just what a sensor that returns the time
for example if on Mondays he finishes at 2pm
the state of the sensor would be 14:00
edit: Actually Schedule next_event attribute does make a lot of sense. except in the morning before school start i would get the start time instead of end time…
You will need something to set that sensor, which is a calendar or a schedule.
How would you set that time otherwise: every night before?
If the schedule is regular on a weekly basis a calendar/schedule would be the easiest option in the sense: set and forget.
is that it returns the end date for the next available event, therfore on a day without a school event it’ll still return the. next end of school time;
{% set noah_school_day = is_state('sensor.noah_school', '1') %}
{% set arthur_school_day = is_state('sensor.arthur_school', '1') %}
{% set noah_school_time = state_attr('sensor.noah_school', 'events') %}
{% set arthur_school_time = state_attr('sensor.arthur_school', 'events') %}
{% if noah_school_day and arthur_school_day %}
Noah finishes school at {{ noah_school_time }} and Arthur at {{ arthur_school_time }}.
{% elif noah_school_day and not arthur_school_day %}
Noah finishes school at {{ noah_school_time }} and Arthur doesn't have school.
{% elif not noah_school_day and arthur_school_day %}
Arthur finishes school at {{ arthur_school_time }} and Noah doesn't have school.
{% else %}
Oh no.. both kids are on holiday.
{% endif %}
it seems to be working fine, but im not sure if its the more elegant solution