Passing variable to script...from a Tile (Solved)

HI, Trying to get a script to receive a variable from my Tiles setup, I’m stuck, and I can’t find the original setup documentation since the author has taken it offline.

what am I dong wrong here:

script:

  tiles_set_hue_scene:
    alias: Tiles set Hue scene
    sequence: 
      service: input_select.select_option
      entity_id: input_select.hue_scenes
      data_template: 
        option: >
          {{ option }}

and the Tiles definition:

type: custom:tiles-card
legacy_config:
  columns: 6
#        column_width: 50px #minmax(75px, 75px)
#        icon_size: 50px
  row_height: 50px
  entities:
    - entity: script.tiles_set_hue_scene
      label: Arctic
      data: >
        {option: 'Arctische dageraad'}
      style_template: >
        if (entities['input_select.hue_scenes'].state === 'Arctische dageraad') return 'background-size: contain;background-color: #F0C209';
        return 'background-size: contain; background-color: #555B65;filter:grayscale(75%)';
      image: /local/hue_scenes/arctic.png

    - entity: script.tiles_set_hue_scene
      label: Savanne
      data: >
        {option: 'Savanne zonsondergang'}
      style_template: >
        if (entities['input_select.hue_scenes'].state === 'Savanne zonsondergang') return 'background-size: contain;background-color: #F0C209';
        return 'background-size: contain; background-color: #555B65;filter:grayscale(75%)';
      image: /local/hue_scenes/savanna.png

    - entity: script.tiles_set_hue_scene
      label: Tropisch
      data: >
        {option: 'Tropische schemering'}
      style_template: >
        if (entities['input_select.hue_scenes'].state === 'Tropische schemering') return 'background-size: contain;background-color: #F0C209';
        return 'background-size: contain; background-color: #555B65;filter:grayscale(75%)';
      image: /local/activities/opstaan.png

This is a effort to use the Lovelace Tiles card, with a legacy setup. Maybe its an issue of different code for the new customcard, so will test the same setup in regular Tiles card also.

Please have a look?

solved…

script was fine, (original) Tiles had to be changed to:

input_text.tiles_set_hue_scene:
  custom_ui_state_card: state-card-tiles
  config:

    columns: 6
  #        column_width: 50px #minmax(75px, 75px)
  #        icon_size: 50px
    row_height: 50px
    entities:
      - entity: script.tiles_set_hue_scene
        label: Arctic
        data: {option: 'Arctische dageraad'}
        style_template: >
          if (entities['input_select.hue_scenes'].state === 'Arctische dageraad') return 'background-size: contain;background-color: #F0C209';
          return 'background-size: contain; background-color: #555B65;filter:grayscale(75%)';
        image: /local/hue_scenes/arctic.png

      - entity: script.tiles_set_hue_scene
        label: Savanne
        data: {option: 'Savanne zonsondergang'}
        style_template: >
          if (entities['input_select.hue_scenes'].state === 'Savanne zonsondergang') return 'background-size: contain;background-color: #F0C209';
          return 'background-size: contain; background-color: #555B65;filter:grayscale(75%)';
        image: /local/hue_scenes/savanna.png

      - entity: script.tiles_set_hue_scene
        label: Tropisch
        data: {option: 'Tropische schemering'}
        style_template: >
          if (entities['input_select.hue_scenes'].state === 'Tropische schemering') return 'background-size: contain;background-color: #F0C209';
          return 'background-size: contain; background-color: #555B65;filter:grayscale(75%)';
        image: /local/activities/opstaan.png

tested for Lovelace legacy Tiles setup: bingo. Works just fine, though other details have to be worked out.