Schedy and dynamic schedules

I am integrating Home Assistant with and external hub, where I want to retrieve signals to dispatch entities at given hours. I have a custom component that retrieves these scheduled dispatches and stores them in a local redis (in same docker cluster as Home Assistant, App daemon and Redis). The problem I have is that I want to show this schedule inside Home Assistant, and thought Schedy could do that since it includes Python scripting in the rules. But it does not seem to allow me to specify more than single number expressions of some sort… any thoughts or views on how to approach this? I could probably just calculate the time of dispatch in appdaemon, but I would ideally want some Home Assistant scheduler to display the planned occurences.

. Tested with a hard coded schedule entry, but that clearly did not work; saying it did not recognize “start”.

class: SchedyApp
actor_type: switch
expression_environment: |
def retrieve_next_schedule(switch_id):
return { start: ‘19:30’, end: ‘22:00’ , weekdays: ‘1-7’}
watched_entities:

  • input_select.schedule_mode
    rooms:
    kitchen:
    actors:
    switch.millheat_panelheater:
    schedule:
    • v: “ON”
      rules:
      • x: retrieve_next_schedule(“switch.millheat_panelheater”)