Hi Jan, Thanks for your great work. I am trying to transfer config from HC2 to HC3 using ER4 and having difficulties with the logic for the following -
I want to close the blinds @ a certain time if the Windows are closed. If Windows are open then log and send a message to Andriod phone
--- Blinds ---
Bedroom_Small_Blind=530, Bedroom_Big_Blind=601,
Ashlee_Blind=651, SpareRoom_Blind=662,
Dinning_Blind=695, Lounge_SunScreen=719,
Lounge_Blind=828, Dinning_Long_Blind=825,
Mitch_Blind=857, Office_SunScreen=918,
Office_Blind=936,
--- Door / Window Sensors ---
Lounge_Balcony_DW_Sensor=542, Bedroom_Small_DW_Sensor=625,
Dinning_DW_Sensor=644, Garage_Door_DW_Sensor=739,
Laundry_Door_DW_Sensor=822, Understairs_DW_Sensor=834,
Mitchell_DW_Sensor=870, Bedroom_Big_DW_Sensor=922,
Ashlee_DW_Sensor=929, Office_DW_Sensor=942,
Office_House_DW_Sensor=965, FrontDoor_DW_Sensor=1094,
Spare_Room_DW_Sensor=658, Garage_House_DW_Sensor=759,
Deck_DW_Sensor=1103
rule("bedroomWindows = {Bedroom_Small_DW_Sensor, Bedroom_Big_DW_Sensor}") -- group both window sensors
rule("bedroomBlinds = {Bedroom_Small_Blind, Bedroom_Big_Blind}") - group both Roller Shutters
rule ("@sunrise+rnd(-00:05,00:15) => bedroomBlinds:open") -- Open bedroom blinds in the morning within 20 min random period of sunrise
rule ([[@sunset+rnd(-00:05,00:15) =>
|| bedroomWindows:safe >> bedroomBlinds:close;
|| bedroomWindows:breached >> log('Blinds can not close as window is open')
]])