Hi everyone I need some help creating template sensor from this JSON String that Curb’s Energy Monitor API provides:
{
"timestamp": 1683341100,
"locationId": "secret_id",
"consumption": 2210,
"production": 0,
"storage": 0,
"net": 2210,
"circuits": [
{
"grid": false,
"production": false,
"battery": false,
"circuit_type": "consumption",
"label": "Fridge and Freezer",
"id": "d7d5d888-aad0-41f6-9998-a7a7259999b4",
"w": 194,
"main": false
},
{
"grid": false,
"production": false,
"battery": false,
"circuit_type": "consumption",
"label": "Office Bathroom and Old Kitchen Plug",
"id": "bf2ad1cb-24fe-4c4b-aac1-5a8a492b148f",
"w": 18,
"main": false
},
{
"grid": false,
"production": false,
"battery": false,
"circuit_type": "consumption",
"label": "AC Master Bedroom",
"id": "bbdb13a0-67c8-4268-b1d7-ee586cc0331d",
"w": 4,
"main": false
},
{
"grid": false,
"production": false,
"battery": false,
"circuit_type": "consumption",
"label": "AC Living Room",
"id": "09817feb-fd6a-4865-882a-d7440eded30d",
"w": 4,
"main": false
},
{
"grid": false,
"production": false,
"battery": false,
"circuit_type": "consumption",
"label": "Washer, Dryer and Master TV",
"id": "f1877bcb-e9fd-483b-b834-1c799af59467",
"w": 83,
"main": false
},
{
"grid": false,
"production": false,
"battery": false,
"circuit_type": "consumption",
"label": "Kitchen Stove, Mini Bar, Wine Cooler",
"id": "57e8efea-182c-4cc2-9524-27bf2601d95b",
"w": 43,
"main": false
},
{
"grid": false,
"production": false,
"battery": false,
"circuit_type": "consumption",
"label": "Water Pump and Deck",
"id": "2a559310-48b1-4a22-b882-aa143c89a070",
"w": 18,
"main": false
},
{
"grid": false,
"production": false,
"battery": false,
"circuit_type": "consumption",
"label": "AC Baby Room",
"id": "17ee63fb-0773-4cbd-985f-c29b305989fa",
"w": 4,
"main": false
},
{
"grid": false,
"production": false,
"battery": false,
"circuit_type": "consumption",
"label": "Baby Room and Guest Bathroom",
"id": "9c62c562-9be7-4bbe-8f1b-91dce4d508b2",
"w": 11,
"main": false
},
{
"grid": false,
"production": false,
"battery": false,
"circuit_type": "consumption",
"label": "Dishwasher and Disposal",
"id": "da1dba20-89ae-4770-80d3-89b5f491c22f",
"w": 893,
"main": false
},
{
"grid": false,
"production": false,
"battery": false,
"circuit_type": "consumption",
"label": "Office and PC Equipment",
"id": "03b725c6-c282-4724-bf1e-aa9ec232d7ae",
"w": 130,
"main": false
},
{
"grid": false,
"production": false,
"battery": false,
"circuit_type": "consumption",
"label": "Living, Dining, Garage Lights",
"id": "95334270-705b-449e-8b88-37b3fa9eb29e",
"w": 353,
"main": false
},
{
"grid": false,
"production": false,
"battery": false,
"circuit_type": "consumption",
"label": "AC Office",
"id": "1ab4d7f3-f844-41d5-8684-70360f59c273",
"w": 4,
"main": false
},
{
"grid": false,
"production": false,
"battery": false,
"circuit_type": "consumption",
"label": "Master Bathroom and Wall behind Bed",
"id": "272f57f4-40a0-4a9c-a7e3-6a66f73758b0",
"w": 86,
"main": false
},
{
"grid": false,
"production": false,
"battery": false,
"circuit_type": "consumption",
"label": "Garage Door",
"id": "2037cb9d-1203-421b-a874-3e618f04d5d0",
"w": 7,
"main": false
}
]
}
I want to have a separate sensor from each circuit. But due to my lack of knowledge in selecting JSON specific values I am stuck.
Any help is appreciated
Thank you