Is there a way to access the room a device has been allocated, either within a driver or an app? Like I believe is available through Maker API.
Believe it was added to the device properties... Let me see if I can find it.
Edit: Found it
Try using device.roomName inside your driver.
3 Likes
Thanks. I knew I'd seen it somewhere....
All attributes actually are available ("room" is not a device attribute in platform terms, an interesting request but a different issue). However, the list is restrcited to types that match your variable, and your variable must be a string. The switch
attribute is the only string attribute that device. The rest are numbers. You would see them with a number variable.