Input picklist to solicit one or more rooms?

Is there an input type/capability for selecting one or more rooms?

Alternately, is there a function/API I can use for get the current rooms as a starting point for a custom picklist?

See also Are APIs available to Custom App Developers for leveraging Rooms and the Devices therein?

I dont have an answer for you but I strongly second Hubitat having this functionality, especially to provide a filtered list of devices in the device selector.

1 Like

Crossposting the solution provided by @Bloodtick_Jones in Are APIs available to Custom App Developers for leveraging Rooms and the Devices therein? - #10 by WesMC.

The app-object doc fails to mention the available functionality.

app.getRooms()

This command provides a map keyed by Room ID and values name (room name) and deviceIds (the devices in the room).

2 Likes

Perfect, that's exactly what we were both looking for. For anyone else interested:

myList = app.getRooms()
log.info ("myList is: $myList")

will get you:

[[id:10, name:Attic, deviceIds:[2489]],
[id:3, name:Basement, deviceIds:[4134, 4135, 2328, 2425, 2457, 2330, 2458, 3226, 2331, 3227]],
[id:6, name:Bathroom (Main), deviceIds:[2360, 3228]],......... etc, etc.

1 Like