Hi All,
In an automation that keeps track of daily energy usage, I have setup two actions in the same automation, one to send a notification with the energy used and next and ifttt trigger to write it into a Google Spreadsheet.
The notification shows the correct values for the calculated readings, the spreadsheet shows the literal string of the value I am trying to send, i.e:
- service: notify.pushover
data_template:
title: "Meterstanden"
message: "Verbruikt op {{ now().year }}-{{ now().month }}-{{ (now().day)-1 }}. Hoog: {{ states('input_number.24hour_power_consumption_normal_tarrif') }} kWh, Laag: {{ states('input_number.24hour_power_consumption_low_tarrif') }} kWh, Gas: {{ states('input_number.24hour_gas_consumption') }} m3. Min-temp: {{ states.sensor.pws_temp_low_1d_c.state }}C, Max-temp: {{ states.sensor.pws_temp_high_1d_c.state }}C"
- service: ifttt.trigger
data: {"event":"Meterstanden", "value1":"{{ states('input_number.24hour_power_consumption_normal_tarrif') }}", "value2":"{{ states('input_number.24hour_power_consumption_low_tarrif') }}", "value3":"{{ states('input_number.24hour_gas_consumption') }}"}
So, the notification shows the actual values of the meter readings, but the spreadsheet shows, literally (without quotes) “{{ states(‘input_number.24hour_gas_consumption’) }}” for example. If I take the double quotes away from the input_number values, the build fails (travis-ci).
I wonder what I am missing here…
The complete automation can be found at the bottom of this file:
https://github.com/aetjansen/HomeAssistant-Config/blob/master/packages/energy.yaml