Usage of a day into an other sensor (max/min value)
Posted: Saturday 14 January 2023 15:54
I try to get de min/max value of the usage of water of a device.
The call of json of the device is the next one:
The device makes a graph and with the hover is the max and min value available.

But i will calculate the difference and add it to a other device with a dzVents script, but the first thing is how get the min/max value of this device?
The call of json of the device is the next one:
Code: Select all
{
"ActTime" : 1673707416,
"AstrTwilightEnd" : "18:53",
"AstrTwilightStart" : "06:39",
"CivTwilightEnd" : "17:28",
"CivTwilightStart" : "08:04",
"DayLength" : "08:02",
"NautTwilightEnd" : "18:12",
"NautTwilightStart" : "07:20",
"ServerTime" : "2023-01-14 15:43:36",
"SunAtSouth" : "12:46",
"Sunrise" : "08:45",
"Sunset" : "16:47",
"app_version" : "2022.2",
"result" :
[
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 11,
"Data" : "42 liter",
"Description" : "",
"Favorite" : 0,
"HardwareDisabled" : false,
"HardwareID" : 9,
"HardwareName" : "Watermeter",
"HardwareType" : "HTTP/HTTPS poller",
"HardwareTypeVal" : 74,
"HaveTimeout" : false,
"ID" : "00082125",
"Image" : "Water",
"LastUpdate" : "2023-01-14 15:43:20",
"Name" : "Totaal waterverbruik",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" :
[
0
],
"Protected" : false,
"SensorType" : 1,
"SensorUnit" : "liter",
"ShowNotifications" : true,
"SignalLevel" : "-",
"SubType" : "Custom Sensor",
"Timers" : "false",
"Type" : "General",
"TypeImg" : "Custom",
"Unit" : 1,
"Used" : 1,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "125"
}
],
"status" : "OK",
"title" : "Devices"
}

But i will calculate the difference and add it to a other device with a dzVents script, but the first thing is how get the min/max value of this device?