I have a sensor reading data from a json file, storing it as a list inside an attribute “data”. I can access the components within and use a for loop to dump the data out. I don’t know how to make it into a table, or add a link/button per row that calls an action with the payload of the order_id
Any help would be greatly appreciated
{% set packages = state_attr('sensor.inbound_mail','data')%}
| Company | Tracking Number | Status | Delivery Date | Items |
{% for i in range(0, packages | count ) %}
{{packages[i]['company']}} - {{packages[i]['status']}}
{% endfor %}
output
Inbound Mail
| Company | Tracking Number | Status | Delivery Date | Items |
Seasons Reflection Co. - Order is Being Filled
Prusa Research - N/A
DriveThruRPG.com - None
Juniper Creates - Pre-Order
CloudFree - Submitted
Youtooz - transit
Curiosity Box - confirmed