Adding Service Data to an Automation

I am trying to add service data to an automation based on suggestion from ChatGPT, see below…

Any idea on how to enter this, or is this another down the rabbit hole (mis-information from AI?)

Please tell us what you are actually trying to do… and please follow the Community Guidelines regarding questions

Templates can be entered into value by switching the action to “Edit in YAML” (I suggest adding a placeholder in the Value field so that it is auto-populated in the YAML version):


I am trying to make a cumulative total of a sensor

The above two steps were straightforward, the next one (below) I did not want to mess around with the automation.yaml as per suggeston from the documentation so I am trying to do this automation through the UI as per below…

I do not know where to enter the service data in the UI

Do you want to see daily/weekly/monthly/yearly totals?

If yes then you should consider using the Utility Meter integration.

For example, this reports daily totals for sensor.your_sensor.

    source: sensor.your_sensor
    name: Daily sensor 
    cycle: daily
1 Like

And it’s a fraction of the configuration that chatgpt offered.

Ideally what I am trying to accomplish is to…

  • Read the Eto sensor value at 11:59 pm each day
  • Whatever that value is at 11:59 add it to the previous day’s value (initially this will be zero) and will accumulate each day
  • once the cumulative value is beyond 15 it will be subtracted by either the rain accumulation from the previous day or a fixed value after my sprinkler is turned on

That won’t work for what I am using as I only want the sensor value at a specific moment in time (11:59 pm) and then add it to the previous days value at 11:59 pm. The sensor is continually calculated and only important to me at the end of the day.

A daily Utility Meter Sensor will report the monitored sensor’s last daily value.

I use a History Stats sensor to compute the day’s total operating time of my HVAC system. A daily Utility Meter Sensor records the History Stats Sensor’s value (at day’s end). I also use weekly/monthly/yearly Utility Meters Sensors.

Anyways, something to keep in mind should you ever need it.

So I believe I have this working, the numbers seem to calculate as/when expected. However this alert comes up, does this mean that eventually it will stop working?

No, it simply means the visual editor can’t do everything yet.

1 Like

Ok thank you for the clarification!