This is my first attempt with scripting, I have taken a script somebody did for me and I am trying to take it as a template for another script. I have changed a few things already but now am stuck.
This is the script:
I know this is surely wrong but shows what I want to do:
Case 22.0 To 23.5 and Tempoutside <18
That's probably relatively easy to rectify.
Now, the next condition I would like to incorporate I only want to trigger Case 22.0 To 23.5 and tempoutside <18 if bedroom window left and bedroom window right are closed.
Also I only want
Case > 23.5
to trigger if bedroom window left and bedroom window right are open
This is the script:
Code:
Sub Main(ByVal Parms As Object) Dim Temperature As Double Temperature = hs.DeviceValueEx(18) Dim Tempoutside As Double Tempoutside = hs.DeviceValueEx(14) Select Case Temperature Case < 20.4 hs.TriggerEvent("AC off auto trigger") Case 22.0 To 23.5 and Tempoutside <18 hs.TriggerEvent("open windows bedroom") Case > 23.5 hs.TriggerEvent("close bedroom windows") End Select End Sub
Case 22.0 To 23.5 and Tempoutside <18
That's probably relatively easy to rectify.
Now, the next condition I would like to incorporate I only want to trigger Case 22.0 To 23.5 and tempoutside <18 if bedroom window left and bedroom window right are closed.
Also I only want
Case > 23.5
to trigger if bedroom window left and bedroom window right are open
Comment