turn a scene into a plug in (or device)

hello all

i have a thermostat and a switch in my z wave network
I want my switch to be turned on on a specific temperature
I wrote this scene and it works fine
but everytime i want to change the temperature i have to go inside and do it manually

how can i turn this scene to like a device where i can type a number and this device or plug in replaces the old number with the new one?
if i can change the “<” and “>” signs will better

the scene is:

local lul_temp = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSensor1”,“CurrentTemperature”, 42)
if (tonumber(lul_temp) >20) then
luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”, “SetTarget”, {newTargetValue = “1”}, 14)
else
luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”, “SetTarget”, {newTargetValue = “0”}, 14)

end

Probably the easiest way is to move the part that varies into a Variable Container device (search for it). Then you can use luup.variable_get() to fetch it and keep your scene as a scene. Replacing the scene with a full-blown plugin is going to be quite a learning curve. If that’s what you want, go for it, but you need to be prepared to work mainly from existing examples and patchy documentation.

i will try my best

thank you :slight_smile:

and if i face any problems i will post it here :smiley: