Hi all! I spent all day reading throughout here, github, the HA official docs. I cannot fix my issue.
Basically, I am trying to use an automation to add a count of squats done every hour to a Google Sheet. Of course, it’s not working, i.e., no data is being written to the sheet.
My automation code:
alias: Update Squats Sheet
description: ""
triggers:
- trigger: event
event_type: mobile_app_notification_action
event_data:
action: Squats Done
- trigger: event
event_type: mobile_app_notification_action
event_data:
action: Squats Incomplete
conditions: []
actions:
- choose:
- conditions:
condition: template
value_template: "{{trigger.event.data.action == 'Squats Done'}}"
sequence:
- action: google_sheets.append_sheet
metadata: {}
data:
add_created_column: true
config_entry: 01KCM1XYRKY2THCZPPPC613E0H
worksheet: Squats
data:
Number: "{{states('input_number.squats')}}"
Test: test123
- action: notify.mobile_app_pixel_9
metadata: {}
data:
message: You Rock!
- conditions:
condition: template
value_template: "{{trigger.event.data.action == 'Squats Incomplete'}}"
sequence:
- action: notify.mobile_app_pixel_9
metadata: {}
data:
message: You Suck!
mode: single
Thanks!