Rpi3, zStick, newest beta.
I would like to turn on a wall socket for my garden pump. But only when the todays rain rate of my personal weather station is lower than 0.5. I have a virtual sensor called "Weatherstation_Todaysrain" the sensor shows the todays rain rate. My code doesn't work seems that I don't get the value.
- Spoiler: show
- return {
on = {
timer = {'at 07:52','at 23:13 '
}
},
execute = function(domoticz, device)
if domoticz.devices('Weatherstation_Todaysrain').nValue <= 0.5 then
domoticz.devices('Wandstecker').switchOn().forMin(30)
end
end
}
When calling the status with json I got
- Spoiler: show
-
ActTime 1564640893
AstrTwilightEnd "00:22"
AstrTwilightStart "02:33"
CivTwilightEnd "21:56"
CivTwilightStart "04:58"
DayLength "15:34"
NautTwilightEnd "22:54"
NautTwilightStart "04:00"
ServerTime "2019-08-01 08:28:13"
SunAtSouth "13:27"
Sunrise "05:40"
Sunset "21:14"
app_version "4.11062"
result
0
AddjMulti 1
AddjMulti2 1
AddjValue 0
AddjValue2 0
BatteryLevel 255
CustomImage 11
Data "4.2 mm"
Description ""
Favorite 0
HardwareID 3
HardwareName "Dummys"
HardwareType "Dummy (Does nothing, use for virtual switches only)"
HardwareTypeVal 15
HaveTimeout true
ID "00082174"
Image "Water"
LastUpdate "2019-07-31 23:23:18"
Name "Weatherstation_Todaysrain"
Notifications "false"
PlanID "0"
PlanIDs
0 0
Protected false
SensorType 1
SensorUnit "mm"
ShowNotifications true
SignalLevel "-"
SubType "Custom Sensor"
Timers "false"
Type "General"
TypeImg "Water"
Unit 1
Used 1
XOffset "0"
YOffset "0"
idx "174"
status "OK"
title "Devices"
I need the value behind Data.
Any help appreciated
