Google Sheets --No data -Solved

I have created the Google Sheet Integration. However, I do not know how to get the actual sensor values. All I get is the text under each column. I am using an automation like this:

service: google_sheets.append_sheet
data:
  config_entry: 075d825238c57f3f729b6927c2b48bbe
  worksheet: Energy Used
  data:
    Phase A: sensor.shellyem3_8caab561d21f_channel_a_power
    Phase B: sensor.shellyem3_8caab561d21f_channel_b_power
    Phase C: sensor.shellyem3_8caab561d21f_channel_c_power

You can use templates to return the data from the sensor.

service: google_sheets.append_sheet
data:
  config_entry: 075d825238c57f3f729b6927c2b48bbe
  worksheet: Energy Used
  data:
    Phase A: "{{ states('sensor.shellyem3_8caab561d21f_channel_a_power') }}"
    Phase B: "{{ states('sensor.shellyem3_8caab561d21f_channel_b_power') }}"
    Phase C: "{{ states('sensor.shellyem3_8caab561d21f_channel_c_power') }}"

Thank you! It works great!!

1 Like

You can use too:

Cocina: "{{ states.sensor.cocina_temperatura.state}}"