I am having multiple Rooms, each with the same base setup. Each room has a chromecast, a buttonboard with 5 Buttons, one PIR and at least one controlled lamp.
Even though the rooms have different configurations, the config base is always the same.
When Button 1 is pressed, the Volumet of the Chromecast in that room should be lowered, Button 2 Increases the volume and button 3 cycles through different scenes for that room.
However I don’t want to create the same rules for every room by hand. Is there a way to automate the creation of these rules?
In python I would do something like that:
def createRoomRules(devices):
... Create the rules ...
roomDevices : [
(room1_cc, room1_b1, room1_b2, ...),
(room2_cc, room2_b1, room2_b2, ...),
(room3_cc, room3_b1, room3_b2, ...)
]
createRoomRules(devices) for device in roomDevices