Hello, does anyone have a code example using the lametric.chart service?
I have been tinkering with this and cant get it to work at all…
Thanks in advance
Hello, does anyone have a code example using the lametric.chart service?
I have been tinkering with this and cant get it to work at all…
Thanks in advance
Sure! Here is a service call example from the UI:
And this is what the same service looks like in YAML:
service: lametric.chart
data:
device_id: 45202d17bbc897e7a9ce4ed1c82ca2c2
data:
- 1
- 2
- 3
- 4
- 5
- 4
- 3
- 2
- 1
sound: cash
cycles: 2
icon_type: info
priority: critical
Thank’s Frenck!!, I now see the missing piece. Where can I see that device ID outside of using automation UI?
btw, I got it to work now…
Is it possible to use templates for the chart-data?
I would also like to create a Lametric chart from a sensor previous values (such as temperature values every 5 minutes in the last 4 hours, i.e. 48 values) but I haven’t found a way to extract that data.
I was looking for that device_id too, where did you find it?
EDIT; it’s in the URL; Device_id: entity_id: where to find - #3 by kotrfa