Problem automation, how to repeat it

I have some WiFi bulbs that are not very responsive. In the Yeelight app, I do need to press the ON (or OFF ) multiple times before the command is executed.

How should I reflect this in my automation? Repeating the command. or?

 - alias: "Garden North ON"
    initial_state: 'on'
    trigger:
      - platform: numeric_state
        entity_id: sun.sun
        value_template: "{{ state.attributes.elevation }}"
    # Can be a positive or negative number
        below: -4.0
    action:
      - service: light.turn_on
        entity_id: light.garden_north_one
      - delay: '00:00:01'
      - service: light.turn_on
        entity_id: light.garden_north_two
      ########## repeat command on
      - delay: '00:00:10'
      - service: light.turn_on
        entity_id: light.garden_north_one
      - delay: '00:00:01'
      - service: light.turn_on
        entity_id: light.garden_north_two
#################
  - alias: "Garden North OFF"
    initial_state: 'on'
    trigger:
      - platform: numeric_state
        entity_id: sun.sun
        value_template: "{{ state.attributes.elevation }}"
    # Can be a positive or negative number
        above: -4.0
    action:
      - service: light.turn_off
        entity_id: light.garden_north_one
      - delay: '00:00:01'
      - service: light.turn_off
        entity_id: light.garden_north_two
         - delay: '00:00:10'
      ############# repeat command off
      - service: light.turn_off
        entity_id: light.garden_north_one
      - delay: '00:00:01'
      - service: light.turn_off
        entity_id: light.garden_north_two
   ############

You could use a wait_template followed by a condition in your automation action to wait for xx seconds to see if the light turned on, and then try again.

Alternatively you could use AppDaemon to create a “while” loop script that loops the light.turn_on command every xx seconds until it does turn on.

Of course, neither of these fixes the actual problem (your lights not responding to commands), so maybe some other poster has a way of fixing that, which would be much better than what I propose.