I want to use google tempature to turn on a light switch device.
Google temperature device #65
Thank you very much for your helps.
I want to use google tempature to turn on a light switch device.
Google temperature device #65
Thank you very much for your helps.
TSS = "urn:upnp-org:serviceId:TemperatureSensor1"
SPS = "urn:upnp-org:serviceId:SwitchPower1"
local Temp = luup.variable_get(TSS, "CurrentTemperature", 65)
local n = tonumber(Temp)
if (n > 60) then
luup.call_action(SPS, "SetTarget", {newTargetValue=1}, 33)
end
This will turn ON device 33 when the temp is > 60.
The question is what would trigger this code …
You really do not need any code.
Setup a scene with an event that triggers when the Google Temperature achieves your threshold. Then add a command to the scene to set your switch.
Best Home Automation shopping experience. Shop at Ezlo!
© 2024 Ezlo Innovation, All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules