This is my heating logic, but I would like to add a safeguard just in case TempOutside has for example a communication error, then I would like to ignore anything relating to TempOutside
Code:
Sub Main(ByVal Parms As Object) Dim TempHall As Double Temperature = hs.DeviceValueEx(308) Dim TempKitchen As Double Temperature = hs.DeviceValueEx(17) Dim TempOutside As Double Temperature = hs.DeviceValueEx(14) Select Case TempHall Case > 19.3 hs.TriggerEvent("Load Heating off") Case 19 To 19.3 hs.TriggerEvent("Load Heating mornings only") Case 18.7 To 19 hs.TriggerEvent("Load Heating mornings and evenings") Case 18.2 to 18.7 If TempOutside is < 1 hs.TriggerEvent("Load Heating very cold") Else hs.TriggerEvent("Load Heating cold") EndIf Case < 18.2 hs.TriggerEvent("Load Heating very cold") End Select End Sub
Comment