I would like to make a blocky to notify me when my iphone is almost charged. I have a script that reads out the battery percentage, but this is written in the DATA field. So I guess this is a string instead of an integer...
Is it possible make such a blocky?
Here's the readout of the IDX:
Code: Select all
{
"ActTime" : 1497470123,
"ServerTime" : "2017-06-14 21:55:23",
"Sunrise" : "05:22",
"Sunset" : "21:57",
"result" : [
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 0,
"Data" : "47.00%",
"Description" : "",
"Favorite" : 0,
"HardwareID" : 119,
"HardwareName" : "Iphone battery",
"HardwareType" : "Dummy (Does nothing, use for virtual switches only)",
"HardwareTypeVal" : 15,
"HaveTimeout" : false,
"ID" : "00082853",
"Image" : "Computer",
"LastUpdate" : "2017-06-14 21:50:04",
"Name" : "iPhone Battery Luke",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" : [ 0 ],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : "-",
"SubType" : "Percentage",
"Timers" : "false",
"Type" : "General",
"TypeImg" : "hardware",
"Unit" : 1,
"Used" : 1,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "853"
}
],
"status" : "OK",
"title" : "Devices"
}