Automating switch and lights in the same automation

Hi Guys,

I would appreciate alittle help, I’m trying to automate some hue lights and a switch in the same automation and get seem to get it to work. I have put the lights and switch in the same group and I’m using the following automation: I’m sure this is a simple fix. The automation below will turn on the hue lights, but not the switch.

    - action:
      - alias: lights for music
        service: homeassistant.turn_on
        entity_id: group.loungelights
      alias: lounge lights music
      condition: []
      id: '1509876174671'
      trigger:
      - entity_id: media_player.lounge
        from: paused
        platform: state
        to: playing

I’m guessing you want the hue lights to come on, in response to the music going from paused to playing.

This might be more like it:

- id: '1509876174671'
  alias: lights for music
  trigger:
    - platform: state
      entity_id: media_player.lounge
      from: 'paused'
      to: 'playing'
  action:
      service: homeassistant.turn_on
      entity_id: group.loungelights

Thanks @Bit-River I tried what you suggested, which does switch on my hue lights, but not the other two switched in my group.

Here is the group I am trying to automate:

loungelights:
  name: Lounge Lights
  entities: 
    - light.lounge_1
    - light.lounge_2
    - swtich.tube_light
    - switch.bendy_light

Maybe all of them should be switches? There’s a typo on the tube light line too.