Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Differentiate zones & rooms in UI #24

Open
BikeRanger opened this issue Oct 27, 2023 · 2 comments
Open

Differentiate zones & rooms in UI #24

BikeRanger opened this issue Oct 27, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@BikeRanger
Copy link

The UI shows a "Rooms" column that includes rooms and zones mixed together. Current functionality is fine, but it would be more clear & helpful if rooms & zones were listed separately.

Solution could be as simple as a second area labeled "Zones" with the appropriate elements (/resource/zone/{id} in v2).

Ideally, the UI could be configured as either zones first or rooms first, as in the Hue mobile app. A zones/rooms toggle could also be an option, but it would be preferable to have both visible & accessible at once.

@JakobJFL
Copy link
Owner

JakobJFL commented Nov 8, 2023

Hi, yeah that is true. It was put together in a hurry so it's not perfect. You are welcome to make a PR. I sadly don't have time to work on it at the moment :/.

@JakobJFL JakobJFL added the enhancement New feature or request label Nov 8, 2023
@mjeveritt
Copy link

Looking at https://developers.meethue.com/develop/hue-api/groupds-api/ it should be possible to distinguish between Rooms and Zones/etc based on the type field in API v1 . To get the basic functions you describe, it shouldn't be too difficult to fetch this info (not currently stored in

) .

Then, a bit of copy-pasta to

for (const room of this.rooms) {
let lightsInThisRoom = [];
for (const light of this.lights) {
if (room.lightsInRoom.includes(String(light.id)))
lightsInThisRoom.push(light);
}
lightsInThisRoom.sort(compare);
allHtml += makeRoomSelecter(room.name, room.on, room.key, room.id, room.bri, lightsInThisRoom);
}
to loop through Zones separate from Rooms, a bit of patching to the HTML div for a new heading ..

I might give this a try, see where I get too .. 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants