Getting weather sensor variables to populate in the automation editor

I’m trying to create an automation, using the automation editor, that when I turn on the kitchen lights in the morning, has google home read my weather from some weather sensor api that I have installed. I can’t seem to get it to trigger from my light being turned on, at all. When I try to run this through the services part of my HA control panel, it triggers the tts, but it reads the sensors just as they are typed, such as “sensor.pws_temp_f”. What am I doing wrong here? I’m new to this depth of config, but I really want to get it down.

  - data:
      entity_id: media_player.kitchen_home
      message: Good morning my little human. It is {{ sensor.pws_weather }} outside,
        with a temperature of {{ sensor.pws_temp_f }}, and the wind is {{ sensor.pws_wind_string }}.  Have
        a wonderful day!
    service: tts.google_say
  alias: morning_weather
  - after: '17:00'
    before: '19:00'
    condition: time
  id: '1515643418012'
  - entity_id: light.kitchen_led_level
    from: 'off'
    platform: state
    to: 'on'```

Try changing data: to data_template:

try states.sensor.pws_temp_f.state instead and same with other sensors you are using. Also remember data_template instead of data

Both of these suggestions, together, worked! Thanks! I had tried using the data_template before, but you can’t really use the automation editor with it, or so it seems. If you do, when you save the automation and come back to it, the data field is blank. Here is the code that I ended up putting manually into my automation.yaml:

  - data_template:
      message: Good morning my little human. It is {{ states.sensor.pws_weather.state }}
        outside, with a temperature of {{ states.sensor.pws_temp_f.state }}, and the wind
        is {{ states.sensor.pws_wind_string.state }}.  Have a wonderful day!
    service: tts.google_say
    entity_id: media_player.kitchen_home
  alias: morning_weather
  condition: []
  id: '1515643418012'
  - at: '20:08'
    platform: time```