Can someone please help me with my code, how do i get this into my Google Sheets integration so that:
-
Each time the counter is increased for any of the sensor’s it UPDATES the prior value instead of adding a new line.
-
The output i am looking for is 4 category columns (one for each sensor) and a new row for each date.
-
Ultimately I am hoping that it updates each category in my sheet replacing the old value against the current date row.
Thank you so much for your help:
alias: Frigate - Road Statistics
description: “”
trigger:
- platform: state
entity_id:- sensor.road_car_count
from: null
id: Private Road Car
- sensor.road_car_count
- platform: state
entity_id:- sensor.road_person_count
id: Private Road Person
- sensor.road_person_count
- platform: state
entity_id:- sensor.oldmans_road_car_count
from: null
id: Oldmans Car
- sensor.oldmans_road_car_count
- platform: state
entity_id:- sensor.oldmans_road_person_count
id: Oldmans Person
from: null
condition:
action:
- sensor.oldmans_road_person_count
- choose:
- conditions:
- condition: trigger
id:- Private Road Car
sequence:
- Private Road Car
- service: counter.increment
metadata: {}
data: {}
target:
entity_id: counter.private_road_daily_car_count
- condition: trigger
- conditions:
- condition: trigger
id:- Private Road Person
sequence:
- Private Road Person
- service: counter.increment
metadata: {}
data: {}
target:
entity_id: counter.private_road_daily_people_count
- condition: trigger
- conditions:
- condition: trigger
id:- Oldmans Car
sequence:
- Oldmans Car
- service: counter.increment
metadata: {}
data: {}
target:
entity_id: counter.oldmans_daily_car_count
- condition: trigger
- conditions:
- condition: trigger
id:- Oldmans Person
sequence:
- Oldmans Person
- service: counter.increment
metadata: {}
data: {}
target:
entity_id: counter.oldmans_daily_people_count
mode: single
- condition: trigger
- conditions: