Phillips hue get current scene

Hi. I’m a heavy user of the Philips Hue and I would like to be able to get the current active scene. In the Philips Hue app, if a scene is active, it is highlighted. All of my Philips hue scenes are visible in Home assistant via the integration. And I can see when they were last triggered. But I would like to be able to get and store the current active scene if there is one, ideally based on their names or zones.

The reason for this is I want to return to the previous dynamic scene. Currently, in Home Assistant, an automation can save the current light state as a scene, then return to and delete this scene at the end of the action. But this does not allow for a return to dynamic scenes offered in the Philips Hue app. To do this, I will need to some how get the currently active scene for a room, zone or light, store that, then call it at the end of the action. The information to do this seems to be available but just isn’t implemented in the integration yet in a way I can use it for this purpose.

Thanks for your help!

Any update about it?

I would greatly appreciate it if it were possible to validate the active scene.

I am currently exporting the HA entities to my Apple HomeKit. In the Home app, I can indeed see the Philips Hue scenes as switches, and within each switch, it displays which one is currently active.
So, I assuming that HA have this info, but Scenes do not have support to shows the active.
Maybe a template sensor could work…

Upvoted. Without this functionality, it’s not possible to fully manage Hue Motion Sensor in Home Assistant.

I want to automate bright lights when motion is detected, and then return to the previous (decorative) scene after a delay. (In addition to causing other effects in my home that have nothing to do with Hue.)

Now, I have to use the Hue app to restore the previous state. Home Assistant has no option to capture the current Hue scene, even though I can clearly see this information is available in the Hue app, so I expect this to be a supported API feature.

I opened a pull request for this, it is currently waiting to be reviewed, all feedback is welcome:
Hue: expose active Hue scene applied to grouped lights by sliekens · Pull Request #151883 · home-assistant/core