Schedule a heater to come on from 5 to 7am

Please could someone advise how to create a switch in my dashboard that switches the heater schedule on (not the heater, but the schedule)

I tried Scheduler Card but the heater never came on.

Far too little information.

What heater do you have, and what schedule is running it? What does having the “schedule switched on” mean? If the schedule is switched off, is the heater always on or always off?

You can create a schedule helper and a toggle helper (which will show as a switch on the dashboard), then define a template binary sensor helper that “ANDs” them together with a state template like:

{{ is_state('schedule.YOUR_SCHEDULE_ENTITY', 'on') and
   is_state('schedule.YOUR_TOGGLE_ENTITY', 'on') }}

Then use that to control your heater: it will be on only when the schedule is live AND the switch is on.

The heater is a boiler “switch.button”. I was hoping to have a morning schedule that I could optionally enable the night before. This would turn it on at 5 and off at 7.

The actual switch name is switch.eta_192_168_4_103_pellet_miscellaneous_on_off_button

With a schedule helper which you create in the UI, active between 5 and 7 (I’ve called it schedule.heating); and a toggle helper (input_boolean.heating_enable):

triggers:
  - trigger: state
    entity_id: schedule.heating
  - trigger: state
    entity_id: input_boolean.heating_enable
actions:
  - action: switch.turn_{{ 'on' if is_state('schedule.heating','on') and 
                                   is_state('input_boolean.heating_enable','on')
                                   else 'off' }}
    target:
      entity_id: switch.eta_192_168_4_103_pellet_miscellaneous_on_off_button