Je veux récupérer la valeur de la Variable "CounterToday" d'un dispositif virtuel type compteur incrémental dans un script lua je vois uniquement counter. Merci pour votre aide
Code : Tout sélectionner
{
"ActTime" : 1579855493,
"AstrTwilightEnd" : "19:42",
"AstrTwilightStart" : "06:50",
"CivTwilightEnd" : "18:32",
"CivTwilightStart" : "08:00",
"DayLength" : "09:29",
"NautTwilightEnd" : "19:08",
"NautTwilightStart" : "07:24",
"ServerTime" : "2020-01-24 09:44:53",
"SunAtSouth" : "13:16",
"Sunrise" : "08:32",
"Sunset" : "18:01",
"app_version" : "4.11641",
"result" :
[
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"Counter" : "4197 mm",
"CounterToday" : "9 mm",
"CustomImage" : 0,
"Data" : "4197 mm",
"Description" : "",
"Favorite" : 0,
"HardwareID" : 17,
"HardwareName" : "VIRTUEL",
"HardwareType" : "Dummy (Does nothing, use for virtual switches only)",
"HardwareTypeVal" : 15,
"HaveTimeout" : false,
"ID" : "82103",
"LastUpdate" : "2020-01-24 09:35:21",
"Name" : "Pluie",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" :
[
0
],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : "-",
"SubType" : "Counter Incremental",
"SwitchTypeVal" : 3,
"Timers" : "false",
"Type" : "General",
"TypeImg" : "counter",
"Unit" : 1,
"Used" : 1,
"ValueQuantity" : "Pluie",
"ValueUnits" : "mm",
"XOffset" : "0",
"YOffset" : "0",
"idx" : "103"
}
],
"status" : "OK",
"title" : "Devices"
}