Closed aaronn closed 6 years ago
A PHSScene object contains a list of lights. From those lights you can get the light state (light.lightState). However, you first have to call fetch on the scene object. Fetch retrieves the light states for the lights, of that scene, from the bridge.
The 'picture' field is just a placeholder to store a unique id that links to an image in your app.
@jhvdb87 this isn’t the scene’s lightstate though, it’s the current lightstate of the light right? I’m trying to populate a list of scenes and want to get the colors in that lightstate so users have a preview instead of just the name
If you do a fetch on the scene, the light point will contain the light state that belongs to the scene
@jhvdb87 Ah I see what I was missing now– there's literally a [scene fetchWithAllowedConnections:...]
call. Thanks!
Is there any way to get a PHSScene preview, either in the form of possible LightStates (ideally) or an image? The PHSScene has a 'picture', but it's an NSString and doesn't seem to return anything.