Automation to switch on and off on 15 minutes off 10 minutes?

I did reload and it did not helped
I restared HA and it showed it in automation but not active and greyed out

What I believe you did not do is execute Check Configuration like I suggested. In addition, the automation you are using is not identical to my example (again).

When I paste your version into my system and execute Check Configuration, it fails.

Invalid config for [automation]: extra keys not allowed @ data[‘action’][0][‘domain’]. Got None
required key not provided @ data[‘action’][0][‘choose’][0][‘sequence’][0][‘repeat’][‘sequence’][0][‘domain’]. Got None. (See /config/configuration.yaml, line 16).

Here’s what I suggested to use:

          while: "{{ now().hour < 9 }}"
          sequence:
          - service: switch.turn_on
            entity_id: switch.towel_heater
          - delay: '00:15:00'
          - service: switch.turn_off
            entity_id: switch.towel_heater
          - delay: '00:10:00'

Here’s what you are using:

          while: "{{ now().hour < 9 }}"
          sequence:
          - service: switch.turn_on
            device_id: 7c8ececa46fe60108acf74b0b39ebb5c
            entity_id: switch.towel_warmer_switch_83
          - delay: '00:15:00'
          - service: switch.turn_off
            device_id: 7c8ececa46fe60108acf74b0b39ebb5c
            entity_id: switch.towel_warmer_switch_83
          - delay: '00:10:00'

See the difference? Your version contains device_id which is not what I suggested to use. What you are trying to do is completely different. It also happens to be incomplete and that’s why Check Configuration indicated it is expecting the domain option but “Got None” (and that’s not the only missing option).

If you would like my continued assistance, please follow the instructions I have provided and use the example without modifications.

1 Like

How can buy you a beer?

1 Like

If you’re feeling generous, you can buy me a coffee. :coffee:

The only one slight issue it does not start?
It shows and all but not starting?

- id: '1606769630857'
  alias: Towel_warmer_morning
  description: ''
  trigger:
  - platform: time
    at:
    - 06:00:00
    - 09:00:00
  action:
  - choose:
    - conditions: '{{ trigger.now.hour == 6 }}'
      sequence:
      - repeat:
          while: '{{ now().hour < 9 }}'
          sequence:
          - service: switch.turn_on
            entity_id: switch.towel_warmer_switch_83
          - delay: 00:15:00
          - service: switch.turn_on
            entity_id: switch.towel_warmer_switch_83
          - delay: 00:10:00
  mode: single
- id: '1606779059467'
  alias: Towel_warmer_eavening
  description: ''
  trigger:
  - platform: time
    at:
    - 19:00:00
    - 23:58:00
  action:
  - choose:
    - conditions: '{{ trigger.now.hour == 19 }}'
      sequence:
      - repeat:
          while: '{{ now().hour < 23:59:00 }}'
          sequence:
          - service: switch.turn_on
            entity_id: switch.towel_warmer_switch_83
          - delay: 00:15:00
          - service: switch.turn_on
            entity_id: switch.towel_warmer_switch_83
          - delay: 00:10:00
  mode: single

I haven’t read the whole thread here, but the automations in your latest post don’t make any sense.

You’re triggering on 2 different times, but then immediately conditioning out one of the triggers in the first step of the action.

You’re also using a ‘choose’ but there’s only one set of actions.

I can see that above your post you’ve had Taras helping you out and I’m not scrolling up any further because I’m 100% certain that he hasn’t suggested you structuring your automations like that.

Please review the documentation on how to structure an automation before going any further.

Check Configuration > Automations and ensure the two automations are turned on.

You should know that what you posted above is, once again, not the same as the example I had suggested. It’s missing the entire section containing default.

Taras
Thank you for all your help and attention.
is there any chance that you can help me with this one
This is what i got now and i would like the same to work from 19:00 to 0:00

- id: '1606769630857'
  alias: Towel_warmer_morning
  description: ''
  trigger:
  - platform: time
    at:
    - 06:00:00
    - 09:00:00
  action:
  - choose:
    - conditions: '{{ trigger.now.hour == 6 }}'
      sequence:
      - repeat:
          while: '{{ now().hour < 9 }}'
          sequence:
          - service: switch.turn_on
            entity_id: switch.towel_warmer_switch_83
          - delay: 00:15:00
          - service: switch.turn_on
            entity_id: switch.towel_warmer_switch_83
          - delay: 00:10:00
    default:
    - service: switch.turn_off
      entity_id: switch.towel_warmer_switch_83

I have combined the morning and evening towel warming into a single automation.

- id: '1606769630999'
  alias: Towel_warmer_morning_and_evening
  description: ''
  trigger:
  - platform: time
    at:
    - 06:00:00
    - 09:00:00
    - 19:00:00
    - 00:00:00
  action:
  - choose:
    - conditions: '{{ trigger.now.hour == 6 or trigger.now.hour == 19 }}'
      sequence:
      - repeat:
          while: '{{ 6 <= now().hour < 9 or 19 <= now().hour <= 23 }}'
          sequence:
          - service: switch.turn_on
            entity_id: switch.towel_warmer_switch_83
          - delay: 00:15:00
          - service: switch.turn_on
            entity_id: switch.towel_warmer_switch_83
          - delay: 00:10:00
    default:
    - service: switch.turn_off
      entity_id: switch.towel_warmer_switch_83
  • When the automation is triggered at 06:00, or 19:00, it will repeatedly turn_on/turn_off the towel warmer until 09:00 (if it was triggered at 06:00) or 00:00 (if it was triggered at 19:00).

  • When the automation is triggered at 09:00, or 00:00, it will turn_off the towel warmer.

1 Like

Thanks for your help
i added it exactly as you written it and it does not show in my automations
I reloaded automations but it did not changed anything

- id: '1605522529347'
  alias: Front door open too long
  description: ''
  trigger:
  - platform: state
    entity_id: binary_sensor.front_door_contact_sensor
    to: 'on'
    for: '120'
  condition:
  - condition: state
    entity_id: binary_sensor.ground_entry_motion_sensor
    state: 'off'
  action:
  - type: turn_on
    device_id: 5633174037c6788d22447da0a5ebab2b
    entity_id: light.entrance_light_level_16
    domain: light
    brightness_pct: 100
  - type: turn_on
    device_id: 9117d5e1aa403dac392e5ececeb9a6bd
    entity_id: switch.ground_floor_stairs_switch_68
    domain: switch
  - type: turn_on
    device_id: 63ce054727c77b21c2f192b3cb2f95be
    entity_id: switch.reception_stairs_switch_72
    domain: switch
  - type: turn_on
    device_id: 2479ad6ef6c78741460efbc6e09f04fd
    entity_id: switch.1st_floor_stairs_switch_60
    domain: switch
  mode: single
- id: '1605736195823'
  alias: 'Wc lights on '
  description: ''
  trigger:
  - platform: state
    entity_id: binary_sensor.ground_toilet_motion_sensor
    to: 'on'
    from: 'off'
  condition:
  - condition: device
    type: is_off
    device_id: adb946916530fb987e90ed1a3fd6226b
    entity_id: switch.ground_floor_toilet_light_switch_69
    domain: switch
  action:
  - type: turn_on
    device_id: 7298b583049cdb83486d352164ea31d0
    entity_id: switch.ground_floor_toilet_mirror_switch_70
    domain: switch
  mode: single
- id: '1605736380964'
  alias: WC Lights off
  description: ''
  trigger:
  - platform: state
    entity_id: binary_sensor.ground_toilet_motion_sensor
    from: 'on'
    to: 'off'
    for: '90'
  condition: []
  action:
  - type: turn_off
    device_id: adb946916530fb987e90ed1a3fd6226b
    entity_id: switch.ground_floor_toilet_light_switch_69
    domain: switch
  - type: turn_off
    device_id: 7298b583049cdb83486d352164ea31d0
    entity_id: switch.ground_floor_toilet_mirror_switch_70
    domain: switch
  mode: single
- id: '1605953015846'
  alias: Utility room lights on
  description: ''
  trigger:
  - platform: state
    entity_id: binary_sensor.utility_pir_motion_sensor
    from: 'off'
    to: 'on'
  condition:
  - condition: device
    type: is_off
    device_id: 3917cc9c69a9818125b086a9837cd9ce
    entity_id: switch.utility_room_light_switch_43
    domain: switch
  action:
  - type: turn_on
    device_id: 3917cc9c69a9818125b086a9837cd9ce
    entity_id: switch.utility_room_light_switch_43
    domain: switch
  mode: single
- id: '1605953154001'
  alias: Utility room lights off
  description: ''
  trigger:
  - platform: state
    entity_id: binary_sensor.utility_pir_motion_sensor
    from: 'on'
    to: 'off'
    for: '180'
  condition: []
  action:
  - type: turn_off
    device_id: 3917cc9c69a9818125b086a9837cd9ce
    entity_id: switch.utility_room_light_switch_43
    domain: switch
  mode: single
- id: '1605953388019'
  alias: Lift on
  description: ''
  trigger:
  - platform: time
    at: '6:00'
  condition: []
  action:
  - type: turn_on
    device_id: 16e2c5581de736a64362eb8359c51c99
    entity_id: switch.lift_switch_81
    domain: switch
  mode: single
- id: '1605953509626'
  alias: Lift off
  description: ''
  trigger:
  - platform: time
    at: '23:30'
  condition: []
  action:
  - type: turn_off
    device_id: 16e2c5581de736a64362eb8359c51c99
    entity_id: switch.lift_switch_81
    domain: switch
  mode: single
- id: '1605956999110'
  alias: Patio lights on
  description: ''
  trigger:
  - platform: state
    entity_id: binary_sensor.kitchen_patio
    from: 'off'
    to: 'on'
  condition:
  - condition: sun
    before: sunrise
    after: sunset
  - condition: device
    type: is_off
    device_id: 4775957bfffb85610aa6ae1812162970
    entity_id: switch.patio_entrance_light_switch_75
    domain: switch
  - condition: device
    type: is_off
    device_id: 21a98da426583c28d788872757f9250a
    entity_id: switch.patio_entrance_step_switch_76
    domain: switch
  - condition: device
    type: is_off
    device_id: 52cf69a90b6d4165ddd351884af92dd5
    entity_id: switch.patio_wall_left_switch_73
    domain: switch
  - condition: device
    type: is_off
    device_id: fbd8c54af7b892db6d73643d1c16e6bd
    entity_id: switch.patio_wall_right_switch_74
    domain: switch
  action:
  - type: turn_on
    device_id: 4775957bfffb85610aa6ae1812162970
    entity_id: switch.patio_entrance_light_switch_75
    domain: switch
  - type: turn_on
    device_id: 21a98da426583c28d788872757f9250a
    entity_id: switch.patio_entrance_step_switch_76
    domain: switch
  mode: single
- id: '1605957232648'
  alias: Patio lights off
  description: ''
  trigger:
  - platform: state
    entity_id: binary_sensor.kitchen_patio
    from: 'on'
    to: 'off'
    for: '6000'
  - platform: state
    entity_id: binary_sensor.kitchen_rear_motion_sensor
    from: 'on'
    to: 'off'
    for: '3000'
  condition: []
  action:
  - type: turn_off
    device_id: 4775957bfffb85610aa6ae1812162970
    entity_id: switch.patio_entrance_light_switch_75
    domain: switch
  - type: turn_off
    device_id: 21a98da426583c28d788872757f9250a
    entity_id: switch.patio_entrance_step_switch_76
    domain: switch
  - type: turn_off
    device_id: 52cf69a90b6d4165ddd351884af92dd5
    entity_id: switch.patio_wall_left_switch_73
    domain: switch
  - type: turn_off
    device_id: fbd8c54af7b892db6d73643d1c16e6bd
    entity_id: switch.patio_wall_right_switch_74
    domain: switch
  mode: single
- id: '1605987924934'
  alias: Entry in the dark
  description: Front door opened when dark and no motion
  trigger:
  - platform: state
    entity_id: binary_sensor.front_door_contact_sensor
    from: 'off'
    to: 'on'
  condition:
  - condition: state
    entity_id: binary_sensor.ground_entry_motion_sensor
    state: 'off'
  action:
  - type: turn_on
    device_id: 5633174037c6788d22447da0a5ebab2b
    entity_id: light.entrance_light_level_16
    domain: light
    brightness_pct: 33
  - type: turn_on
    device_id: 9117d5e1aa403dac392e5ececeb9a6bd
    entity_id: switch.ground_floor_stairs_switch_68
    domain: switch
  - type: turn_on
    device_id: 63ce054727c77b21c2f192b3cb2f95be
    entity_id: switch.reception_stairs_switch_72
    domain: switch
  mode: single
- id: '1606244255024'
  alias: Patio lights on when Dinner
  description: ''
  trigger:
  - platform: state
    entity_id: binary_sensor.kitchen_rear_motion_sensor
    from: of
    to: 'on'
  condition:
  - condition: sun
    before: sunrise
    after: sunset
  action:
  - type: turn_off
    device_id: 52cf69a90b6d4165ddd351884af92dd5
    entity_id: switch.patio_wall_left_switch_73
    domain: switch
  mode: single
- id: '1606769630999'
  alias: Towel_warmer_morning_and_evening
  description: ''
  trigger:
  - platform: time
    at:
    - 06:00:00
    - 09:00:00
    - 19:00:00
    - 00:00:00
  action:
  - choose:
    - conditions: '{{ trigger.now.hour == 6 or trigger.now.hour == 19 }}'
      sequence:
      - repeat:
          while: '{{ 6 <= now().hour < 9 or 19 <= now().hour <= 23 }}'
          sequence:
          - service: switch.turn_on
            entity_id: switch.towel_warmer_switch_83
          - delay: 00:15:00
          - service: switch.turn_on
            entity_id: switch.towel_warmer_switch_83
          - delay: 00:10:00
    default:
    - service: switch.turn_off
      entity_id: switch.towel_warmer_switch_83

OK, I see the problem.

For some reason, it accepts a time with a leading zero such as 06:00:00 but it doesn’t like the time that has no leading zero like 19:00:00.

The easiest way to fix it is to wrap each time in quotes as shown here:

- id: '1606769630999'
  alias: Towel_warmer_morning_and_evening
  description: ''
  trigger:
  - platform: time
    at:
    - '06:00:00'
    - '09:00:00'
    - '19:00:00'
    - '00:00:00'
  action:
  - choose:
    - conditions: '{{ trigger.now.hour == 6 or trigger.now.hour == 19 }}'
      sequence:
      - repeat:
          while: '{{ 6 <= now().hour < 9 or 19 <= now().hour <= 23 }}'
          sequence:
          - service: switch.turn_on
            entity_id: switch.towel_warmer_switch_83
          - delay: 00:15:00
          - service: switch.turn_off
            entity_id: switch.towel_warmer_switch_83
          - delay: 00:10:00
    default:
    - service: switch.turn_off
      entity_id: switch.towel_warmer_switch_83

EDIT

Corrected copy-paste error. Second service changed from turn_on to turn_off.

We are making progress
it switched ON yesterday at 19:00 but did not switch off since then?

Are there any related warning messages in the Log?

We may need to add mode restart to the automation.

- id: '1606769630999'
  alias: Towel_warmer_morning_and_evening
  description: ''
  mode: restart
  trigger:

started but id not stopped

I have created a slightly different version of the automation for myself so that I can test it on my system. It will help me understand why it isn’t working correctly for you.

While I was creating it, I noticed a mistake. During our discussion, I copy-pasted a few lines without examining them closely. Unfortunately, I copied a mistake.

In my original example, I has suggested the following. Notice how it first calls the turn_on service and then the turn_off service :

          sequence:
          - service: switch.turn_on
            entity_id: switch.towel_warmer_switch_83
          - delay: 00:15:00
          - service: switch.turn_off
            entity_id: switch.towel_warmer_switch_83
          - delay: 00:10:00

Later, I blindly copied what you had posted here and have been using it ever since. Unfortunately, it contains a mistake. The second service call is turn_on but it should be turn_off

          sequence:
          - service: switch.turn_on
            entity_id: switch.towel_warmer_switch_83
          - delay: 00:15:00
          - service: switch.turn_on
            entity_id: switch.towel_warmer_switch_83
          - delay: 00:10:00

Please change the second service call to switch.turn_off to make it match my original example.

I believe the automation still should have turned off the switch at 09:00 and 00:00 because that’s what the default section is designed to do. I will be testing it on my system to understand why it failed to do that.

it switched off now but it did not switch back on

I’m still running my tests. So far it has successfully completed its first cycle. It triggered at the correct start time, correctly toggled an input_boolean (instead of a switch), then turned off the input_boolean at the correct end time. I am now waiting for it to start its second cycle which I have programmed to run longer. I will have results later this evening (at 18:00 EST). However, so far, the first cycle worked correctly.

If you’re interested, this is the automation I am testing:

- alias: Towel_warmer
  mode: restart
  trigger:
  - platform: time
    at:
    - '15:30:00'
    - '16:00:00'
    - '17:00:00'
    - '18:00:00'
  action:
  - choose:
    - conditions: '{{ trigger.now.hour == 15 or trigger.now.hour == 17 }}'
      sequence:
      - service: persistent_notification.create
        data:
          title: "{{ now().timestamp()|timestamp_local() }}"
          message: "Begin toggling."
      - repeat:
          while: '{{ 15 <= now().hour < 16 or 17 <= now().hour < 18 }}'
          sequence:
          - service: input_boolean.turn_on
            entity_id: input_boolean.test
          - delay: 00:15:00
          - service: input_boolean.turn_off
            entity_id: input_boolean.test
          - delay: 00:10:00
      - service: persistent_notification.create
        data:
          title: "{{ now().timestamp()|timestamp_local() }}"
          message: "End toggling."
    default:
    - service: persistent_notification.create
      data:
        title: "{{ now().timestamp()|timestamp_local() }}"
        message: "Stop toggling."
    - service: input_boolean.turn_off
      entity_id: input_boolean.test

Here are the notifications it has produced. It just started its second cycle at 17:00. The second cycle will finish at 18:00.

I give up i replaced it with this it is messy and i need to try to do it your way but this works for now

- id: '1607032330600'
  alias: Towel On 06:00
  description: ''
  trigger:
  - platform: time
    at: '06:00'
  condition: []
  action:
  - type: turn_on
    device_id: 7c8ececa46fe60108acf74b0b39ebb5c
    entity_id: switch.towel_warmer_switch_83
    domain: switch
  mode: single
- id: '1607032330625'
  alias: Towel On 06:25
  description: ''
  trigger:
  - platform: time
    at: '06:25'
  condition: []
  action:
  - type: turn_on
    device_id: 7c8ececa46fe60108acf74b0b39ebb5c
    entity_id: switch.towel_warmer_switch_83
    domain: switch
  mode: single
- id: '1607032300650'
  alias: Towel On 06:50
  description: ''
  trigger:
  - platform: time
    at: '06:50'
  condition: []
  action:
  - type: turn_on
    device_id: 7c8ececa46fe60108acf74b0b39ebb5c
    entity_id: switch.towel_warmer_switch_83
    domain: switch
  mode: single
- id: '1607032300715'
  alias: Towel On 07:15
  description: ''
  trigger:
  - platform: time
    at: '07:15'
  condition: []
  action:
  - type: turn_on
    device_id: 7c8ececa46fe60108acf74b0b39ebb5c
    entity_id: switch.towel_warmer_switch_83
    domain: switch
  mode: single
- id: '1607032300740'
  alias: Towel On 07:40
  description: ''
  trigger:
  - platform: time
    at: '07:40'
  condition: []
  action:
  - type: turn_on
    device_id: 7c8ececa46fe60108acf74b0b39ebb5c
    entity_id: switch.towel_warmer_switch_83
    domain: switch
  mode: single
- id: '1607032300805'
  alias: Towel On 08:05
  description: ''
  trigger:
  - platform: time
    at: '08:05'
  condition: []
  action:
  - type: turn_on
    device_id: 7c8ececa46fe60108acf74b0b39ebb5c
    entity_id: switch.towel_warmer_switch_83
    domain: switch
  mode: single
- id: '1607032300830'
  alias: Towel On 08:30
  description: ''
  trigger:
  - platform: time
    at: '08:30'
  condition: []
  action:
  - type: turn_on
    device_id: 7c8ececa46fe60108acf74b0b39ebb5c
    entity_id: switch.towel_warmer_switch_83
    domain: switch
  mode: single
- id: '1607032300855'
  alias: Towel On 08:55
  description: ''
  trigger:
  - platform: time
    at: '08:55'
  condition: []
  action:
  - type: turn_on
    device_id: 7c8ececa46fe60108acf74b0b39ebb5c
    entity_id: switch.towel_warmer_switch_83
    domain: switch
  mode: single
- id: '1607032300920'
  alias: Towel On 09:20
  description: ''
  trigger:
  - platform: time
    at: '09:20'
  condition: []
  action:
  - type: turn_on
    device_id: 7c8ececa46fe60108acf74b0b39ebb5c
    entity_id: switch.towel_warmer_switch_83
    domain: switch
  mode: single
- id: '160703230945'
  alias: Towel On 09:45
  description: ''
  trigger:
  - platform: time
    at: '09:45'
  condition: []
  action:
  - type: turn_on
    device_id: 7c8ececa46fe60108acf74b0b39ebb5c
    entity_id: switch.towel_warmer_switch_83
    domain: switch
  mode: single
- id: '1607032301010'
  alias: Towel On 10:10
  description: ''
  trigger:
  - platform: time
    at: '10:10'
  condition: []
  action:
  - type: turn_on
    device_id: 7c8ececa46fe60108acf74b0b39ebb5c
    entity_id: switch.towel_warmer_switch_83
    domain: switch
  mode: single
- id: '1607032301035'
  alias: Towel On 10:35
  description: ''
  trigger:
  - platform: time
    at: '10:35'
  condition: []
  action:
  - type: turn_on
    device_id: 7c8ececa46fe60108acf74b0b39ebb5c
    entity_id: switch.towel_warmer_switch_83
    domain: switch
  mode: single++++++
- id: '1607032331900'
  alias: Towel On 19:00
  description: ''
  trigger:
  - platform: time
    at: '19:00'
  condition: []
  action:
  - type: turn_on
    device_id: 7c8ececa46fe60108acf74b0b39ebb5c
    entity_id: switch.towel_warmer_switch_83
    domain: switch
  mode: single
- id: '1607032331925'
  alias: Towel On 19:25
  description: ''
  trigger:
  - platform: time
    at: '19:25'
  condition: []
  action:
  - type: turn_on
    device_id: 7c8ececa46fe60108acf74b0b39ebb5c
    entity_id: switch.towel_warmer_switch_83
    domain: switch
  mode: single
- id: '1607032301950'
  alias: Towel On 19:50
  description: ''
  trigger:
  - platform: time
    at: '19:50'
  condition: []
  action:
  - type: turn_on
    device_id: 7c8ececa46fe60108acf74b0b39ebb5c
    entity_id: switch.towel_warmer_switch_83
    domain: switch
  mode: single
- id: '1607032302015'
  alias: Towel On 20:15
  description: ''
  trigger:
  - platform: time
    at: '20:15'
  condition: []
  action:
  - type: turn_on
    device_id: 7c8ececa46fe60108acf74b0b39ebb5c
    entity_id: switch.towel_warmer_switch_83
    domain: switch
  mode: single
- id: '1607032302040'
  alias: Towel On 20:40
  description: ''
  trigger:
  - platform: time
    at: '20:40'
  condition: []
  action:
  - type: turn_on
    device_id: 7c8ececa46fe60108acf74b0b39ebb5c
    entity_id: switch.towel_warmer_switch_83
    domain: switch
  mode: single
- id: '1607032302105'
  alias: Towel On 21:05
  description: ''
  trigger:
  - platform: time
    at: '21:05'
  condition: []
  action:
  - type: turn_on
    device_id: 7c8ececa46fe60108acf74b0b39ebb5c
    entity_id: switch.towel_warmer_switch_83
    domain: switch
  mode: single
- id: '1607032302130'
  alias: Towel On 21:30
  description: ''
  trigger:
  - platform: time
    at: '21:30'
  condition: []
  action:
  - type: turn_on
    device_id: 7c8ececa46fe60108acf74b0b39ebb5c
    entity_id: switch.towel_warmer_switch_83
    domain: switch
  mode: single
- id: '1607032302155'
  alias: Towel On 21:55
  description: ''
  trigger:
  - platform: time
    at: '21:55'
  condition: []
  action:
  - type: turn_on
    device_id: 7c8ececa46fe60108acf74b0b39ebb5c
    entity_id: switch.towel_warmer_switch_83
    domain: switch
  mode: single
- id: '1607032302220'
  alias: Towel On 22:20
  description: ''
  trigger:
  - platform: time
    at: '22:20'
  condition: []
  action:
  - type: turn_on
    device_id: 7c8ececa46fe60108acf74b0b39ebb5c
    entity_id: switch.towel_warmer_switch_83
    domain: switch
  mode: single
- id: '1607032302245'
  alias: Towel On 22:45
  description: ''
  trigger:
  - platform: time
    at: '22:45'
  condition: []
  action:
  - type: turn_on
    device_id: 7c8ececa46fe60108acf74b0b39ebb5c
    entity_id: switch.towel_warmer_switch_83
    domain: switch
  mode: single
- id: '1607032302310'
  alias: Towel On 23:10
  description: ''
  trigger:
  - platform: time
    at: '23:10'
  condition: []
  action:
  - type: turn_on
    device_id: 7c8ececa46fe60108acf74b0b39ebb5c
    entity_id: switch.towel_warmer_switch_83
    domain: switch
  mode: single
- id: '1607032302335'
  alias: Towel On 23:35
  description: ''
  trigger:
  - platform: time
    at: '23:35'
  condition: []
  action:
  - type: turn_on
    device_id: 7c8ececa46fe60108acf74b0b39ebb5c
    entity_id: switch.towel_warmer_switch_83
    domain: switch
  mode: single
- id: '1607033249743'
  alias: TowelOFF
  description: ''
  trigger:
  - platform: device
    type: turned_on
    device_id: 7c8ececa46fe60108acf74b0b39ebb5c
    entity_id: switch.towel_warmer_switch_83
    domain: switch
    for:
      hours: 0
      minutes: 15
      seconds: 0
  condition: []
  action:
  - type: turn_off
    device_id: 7c8ececa46fe60108acf74b0b39ebb5c
    entity_id: switch.towel_warmer_switch_83
    domain: switch
  mode: single

Final results of my test demonstrate that the automation works exactly as designed.

It turned on the input_boolean at 15:30 and 17:00 and turned off the input_boolean at 16:00 and 18:00. During the two periods, the input_boolean was turned on for 15 minutes and then turned off for 10 minutes, repeating this pattern until the period ended.

This is precisely the behavior you want. If your instance of the automation is not turning off the heater at the specified times then it is different in some subtle but significant way. All I can say is you should review it, line by line, and ensure it matches what I originally posted. For example, if it is missing the default section, it will definitely fail to turn off the heater.

1 Like