gurumitts / pylutron-caseta

Apache License 2.0
153 stars 98 forks source link

What is a "zone" in this API, and how does it relate to Lutron app rooms? #133

Closed FlyingDiver closed 10 months ago

FlyingDiver commented 1 year ago

Background: I've been programming with the old telnet-style Integration Protocol for years (large RRa2 install), but am just now looking at LEAP.

I got a Caseta starter kit (hub, pico, plug-in module) and have started writing code using this library. My intent is use it for RRa3 eventually, but the Caseta starter kit was cheap.

I'm trying to figure out how to group the devices discovered by the room assigned in the Lutron app. Questions:

  1. What is the "zone" field in the device data returned by the API?
  2. What is the "area" field?
  3. If one of the above represents the room assigned in the app, is there a way to map that field to the room name (other than parsing it from the "name" field?
  4. Why no get_occupancy_groups() method? There are methods for scenes, devices, buttons, etc.
FlyingDiver commented 1 year ago

Ok, the area field links back to the name using the bridge.areas dict.

Still not sure what the zone represents. Also, seems like those dicts should have cover methods.