Hi. Anyone know if there is a possibility to display data from a database or json from url in a table such as flex-table-card?
Thanks
columns:
- attr_as_list: mediciones
modify: x.KH
name: KH
- attr_as_list: mediciones
modify: x.CA
name: CA
- attr_as_list: mediciones
modify: x.MG
name: MG
- attr_as_list: mediciones
modify: x.NO3
name: NO3
- attr_as_list: mediciones
modify: x.PO4
name: PO4
- attr_as_list: mediciones
modify: x.Fecha
name: Fecha
entities:
include: sensor.mediciones
title: Mediciones del Acuario
type: 'custom:flex-table-card'
RESTful Sensor I use it to call a local php file that returns a json in configuration.yaml
{"mediciones":[{"KH":9.3,"CA":380,"MG":1300},{"KH":8,"CA":440,"MG":1350}]}
Hi Pablo
Could you please show me your RESTful Sensor code ?
How to use it if my json is returned as attribute of a sensor (not sensor state)?
This is how my sensor looks like:
icon: mdi:chip
friendly_name: 1NUC Top Processes usage
response: |
{
"data": [
{
"proc": "polkitd",
"cpu": "23,5"
},
{
"proc": "dbus-da+",
"cpu": "11,8"
},
{
"proc": "top",
"cpu": "11,8"
},
{
"proc": "Network+",
"cpu": "5,9"
},
{
"proc": "x11vnc",
"cpu": "5,9"
}
]
}