Switch Timer Automation

Newbie here so if this has been answered and I can’t find it in the forum, please forgive me.

I am setting up my switches to have automated time on and off each day. The problem is that I can’t pick which switch I want to set up with a specific time. They just all turn off an on at the exact same time. I tried adding an entity line to the Action in the automations.yaml file, but then nothing happens at all.

Thanks is advance.

Please post the (correctly formatted) automation you are attempting to use or it is impossible to help.

Have a read of point 11 here on formatting: How to help us help you - or How to ask a good question

  • id: ‘1567614588519’
    alias: Family Room Hutch - Timer On
    trigger:
    • at: ‘17:00:00’
      platform: time
      condition: []
      action:
    • alias: ‘’
      data: {}
      service: switch.turn_on
  • id: ‘1567616235289’
    alias: Family Room Hutch - Timer Off
    trigger:
    • at: 01:00:00
      platform: time
      condition: []
      action:
    • service: switch.turn_off
  • id: ‘1567737193576’
    alias: Front Door Hutch - Turn On
    trigger:
    • at: ‘23:06:00’
      platform: time
      condition:
    • condition: state
      entity_id: switch.front_door_hutch
      state: ‘off’
      action:
    • alias: ‘’
      data: {}
      service: switch.turn_on

Please edit your post and correctly format your pasted code as requested.

This is what automatons creates in my automation.yaml file. I created an image since copy and paste didn’t work right. Thanks,

Please read point 11 here on formatting: How to help us help you - or How to ask a good question and edit your post accordingly.

I’m not doing this to be annoying. A correctly formatted post helps us help you.

I figured it out. Thanks for being willing to help. In the automations service data I had to add

{ "entity_id": [ "switch.front_door_hutch" ] }

When I originally entered it I forgot the [ ] brackets.