Blocky to DzVents Bathroom Fan
Posted: Friday 01 May 2020 22:11
I have an Aeotec Multisensor 6, this gives a device Temp/Hum.
For this script I only need the humidity, but I can't see how to select this. See my code underneath, I also tried device.humidity, but it gives the same result. The subtype of the device is WTGR800.
This gives the following error in my log:
2020-05-01 21:18:38.175 Error: dzVents: Error: (3.0.2) An error occurred when calling event handler Afzuiging Badkamer DzVents
2020-05-01 21:18:38.175 Error: dzVents: Error: (3.0.2) ...dzVents/generated_scripts/Afzuiging Badkamer DzVents.lua:6: attempt to call a number value (field 'humidity')
For this script I only need the humidity, but I can't see how to select this. See my code underneath, I also tried device.humidity, but it gives the same result. The subtype of the device is WTGR800.
Code: Select all
return {
on = {
devices = {'Temp/Hum Badkamer'}
},
execute = function(domoticz, device)
if device.hum('Temp/Hum Badkamer') > 60 then
dz.devices('Afzuiging Badkamer').switchOn()
end
if device.hum('Temp/Hum Badkamer') < 60 then
dz.devices('Afzuiging Badkamer').switchOff().afterMin(15)
end
end
}
2020-05-01 21:18:38.175 Error: dzVents: Error: (3.0.2) An error occurred when calling event handler Afzuiging Badkamer DzVents
2020-05-01 21:18:38.175 Error: dzVents: Error: (3.0.2) ...dzVents/generated_scripts/Afzuiging Badkamer DzVents.lua:6: attempt to call a number value (field 'humidity')