Scheduling input_select changes in Lovelace

Hi all,

I’ve been dabbling in HA and AppDaemon for the last month and have created a nice heating automation for the whole house in AppDaemon, where the current heating schedule can be selected in HA via an input_select (e.g. family_at_home, family_away, home_office, etc.).

What I would like to add to Lovelace UI now is a way to schedule the value of the input_select, e.g. setting home_office for the next day or family_away with a start and end date.
So far, I have played around with various helpers (input_datetime), buttons and conditional cards trying to glue this all together with AppDaemon but this seems very cumbersome.

Reading up on lovelace and custom components, I came up with the following idea, however your input is greatly appreciated before I start running into the wrong direction:

  • Create a custom component to hold schedules for an input_select (start time, end time, value, default value)
  • Create a custom lovelace card to easily create and delete new items for the schedule
  • Use appdaemon to listen on state changes of the custom component and switch the corresponding input_select according to the custom component state
  • [Optional: create sensors from within appdaemon for next scheduled value, time, etc. for easy integration in existing Lovelace cards]

Is this a sound approach?

I have more further questions (use websockets or the hass object in js? Are services required to change state and attributes of the custom_component?, etc.) that I hope to clarify in the discussion below.

Thanks!
Tom

not exactly sure if i fully understood what you need, but maybe check out Scheduler component