5iver
(Scott Rushworth)
3
You only need to check the state of your beacons once and the name attribute is a String but state is a State…
gRoomOccupancy.members.forEach[ room |
if (room.name != ChetBeacon.state.toString || room.name != KathrinBeacon.state.toString) {
room.sendCommand(if (room.state == OFF) ON else OFF)
}
]
However, your hardware would go really well with…