Virtual Light - Help needed

Hello!
So I had a virtual light for Alexa TTS functionality for years and at some point with an update it stopped working. There were instructions on how to do this in the custom alexa integration oce but I cant find it anymore. I read the documentation on templates and lights and all but I cant figure out what is wrong and if I need scripts for the turn_on and off and dim functions now.

So I had this now for years in my configuration.yaml, but it now gives me errors in code if I dont add anything behind turn_on etc.:

light:
  #Dummy Alexa Light for Alexa tts function "last alexa called"
  - platform: template
    lights:
      alexa_virtual:
        friendly_name: "Alexa TTS Licht"
        turn_on:
        turn_off:
        set_level:

So I changed it to this, but now when I want to switch it off I get an error that the service call must contain at least an entity ID. And if I click on settings of the entity I get a message that light.alexa_virtual does not have a clear entity ID.

light:
  #Dummy Alexa Light for Alexa tts function "last alexa called"
  - platform: template
    lights:
      alexa_virtual:
        friendly_name: "Alexa TTS Licht"
        turn_on:
          service: light.turn_on
        turn_off:
          service: light.turn_off
        set_level:
          service: light.turn_on
          data_template:
            entity_id: light.alexa
            brightness: "{{ brightness }}"

Any help is appreciated. I am not the best at yaml. :slight_smile:

You need to specify a target (e.g. an entity_id) for both those services. It is not optional.

like this perhaps:

light:
  #Dummy Alexa Light for Alexa tts function "last alexa called"
  - platform: template
    lights:
      alexa_virtual:
        friendly_name: "Alexa TTS Licht"
        turn_on:
          service: light.turn_on
          entity_id: light.alexa_virtual
        turn_off:
          service: light.turn_off
          entity_id: light.alexa_virtual
        set_level:
          service: light.turn_on
          entity_id: light.alexa_virtual
          data_template:
            entity_id: light.alexa_virtual
            brightness: "{{ brightness }}"

i do like this for my template lights:

 lights:
    brasseur_bureau_led_remote:
      friendly_name: "Brasseur Bureau Led Remote"
      unique_id: "brasseur bureau led Remote"
      turn_on:
        - condition: state
          entity_id: light.brasseur_bureau_led_remote
          state: "off"
      turn_off:
        - condition: state
          entity_id: light.brasseur_bureau_led_remote
          state: "on"

perfect that worked thank you!!