I have a Domoticz instance running a Volcraft CO-20 USB air quality sensor and I want with Scrape to import it’s value into HA (green), I tried to get the value imported through a JSON message like this:
{
"ActTime" : 1714903462,
"AstrTwilightEnd" : "23:45",
"AstrTwilightStart" : "03:23",
"CivTwilightEnd" : "21:47",
"CivTwilightStart" : "05:22",
"DayLength" : "15:07",
"NautTwilightEnd" : "22:38",
"NautTwilightStart" : "04:30",
"ServerTime" : "2024-05-05 12:04:22",
"SunAtSouth" : "13:34",
"Sunrise" : "06:01",
"Sunset" : "21:07",
"app_version" : "2024.4",
"result" :
[
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 0,
"Data" : "966 ppm",
"Description" : "",
"Favorite" : 1,
"HardwareDisabled" : false,
"HardwareID" : 6,
"HardwareName" : "Luchtkwaliteit",
"HardwareType" : "Volcraft CO-20 USB air quality sensor",
"HardwareTypeVal" : 11,
"HaveTimeout" : false,
"ID" : "0001",
"LastUpdate" : "2024-05-05 12:04:17",
"Name" : "Luchtkwaliteit huiskamer",
"Notifications" : "true",
"PlanID" : "0",
"PlanIDs" :
[
0
],
"Protected" : false,
"Quality" : "Fair",
"ShowNotifications" : true,
"SignalLevel" : "-",
"SubType" : "Voc",
"Timers" : "false",
"Type" : "Air Quality",
"TypeImg" : "air",
"Unit" : 1,
"Used" : 1,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "18"
}
],
"status" : "OK",
"title" : "Devices"
where “Data” : “966 ppm”, is the current value to be imoprted.
The resource is this url:
http://192.168.178.96:8080/json.htm?type=command¶m=getdevices&rid=18
and I tried to get the value imported by looking for this:
BatteryLevel":255,CustomImage":0,"Data" :
Template used: value_template: “{{ value_json[‘ppm’] }}”
Can anyone help me with this because what I do, I can’t get the value into HA, mostly I read Entity not available…