Scenes in 3.10.0

As I see it, when I click on the Tile for the scene it would set the status for the scene to On and select the Details page for that specific scene. On the Details page I would have a button to end the scene and thus set the status to Off, power off the used devices and go back to the device browser page.

There could be another way to set the status to Off but I guess that will be a lot more difficult to implement. Whenever another scene is selected, the status of the scene that is On will be set to Off and user defined actions for the Off state of the old scene will be performed. And now the difficult part, that should only happen for scenes in the same group. Normally I would group my devices based on the devices in a specific room. So per group / room there can only be one specific scene active, There can be more then one scene active, but not in the same group / room.

Maybe we can put this idea about a status property on hold an you could prioritize the conditions for the individual actions. :slight_smile: With that functionality and the use of virtual devices I would be able to track the status of a scene. I could send you a project with that functionality implemented and you could review if a status property for a scene would be a better idea.

3.10.2 was published earlier today & it has support for Conditions on individual Actions. I also decided to rename Conditions on the actual Scene to Triggers.

Hi Bill
Is it possible for you post an example of the use of scenes, please?
Thanks

There’s an example in the top post.

Sorry my questions but I think of scenes like in Harmony Hub. When we turn the scene on, we need to turn it off for it to be off. Using THR, I trigger the scene, closed the app and open it again, and the scene starts always as “off”

You’re saying the scene is firing when it’s not supposed to? Look at your triggers. You’ve probably got a trigger condition that is still active.

Scenes are not like Harmony Activities. Multiple scenes can be triggered at any time.

Actually I did not understand the concept of scenes, sorry

I don’t know if it’s just me. Scene#1 is not turning the switch on in the SceneExample.hrp
Thanks in advance.

It’s not supposed to. That’s not what the example was trying to demonstrate. The only action in the scene is the “Hello World!” toast message. No device commands are sent.

The example was trying to show that this scene can be triggered manually by clicking the “Scene #1” button or automatically when the switch turns on. It’s the opposite of what you are suggesting. When you click the switch, it triggers the scene, not vice versa.

You can certainly create a scene that turns a switch on. I just wanted to show how scenes can be executed either manually or automatically.

Now I understand how it works. whoo~
Learning day by day

Thank you.

I believe I read in one of the posts (and I think I’m seeing it as I’m working on my old project) that a lot of the action functionality of variables is being depreciated in favor of scenes. That’s the kick I needed in order to start moving actions off variables, preferably this time avoiding scripts.

The thing I can’t figure out how to do within a scene, without a script, is set a device to another variable. I noticed in my password pin code variables (from one of Bill’s older templates) that previously you could use $HomeRemote.DEVICE.ATTRIBUTE.Value. I thought that would be my answer, but it doesn’t seem to work within scenes.

Is there any way to reference another device/variable’s value as the value to be set from within a scene?

I guess not without a ScriptAction. Bill wrote here: (Hubitat) How to send custom device commands (outside normal Capabilities) that there is no reference support for the DataAction value and I think this is also true within scenes.

1 Like

What I probably should do is make the Value property on the DataAction bindable. That will allow you to forward the value from 1 device into another. I can try & add that to the next release.

1 Like

Yes, beginning in version 3.17.0.0 you can reference another device’s value in a Scene’s DataAction.

@bill Thanks Bill! I have it working.

Maybe I’m overly stupid but I don’t get how I could trigger a scene from a button. When I create a scene in the scenes folder and I have a simple page (not group or something) with it’s buttons and I want the buttons to trigger scenes (without displaying any tile or something) how do I do this?

With the old VirtualDeviceActions it was as easy as adding an EventTrigger for “Clicked” and use a DataAction to set a value to the bound VirtualDeviceVariable.

I couldn’t find out how I do this with scenes? Cause in the device.bindings the scene is not listed. There’s also no other thing I spotted in the button to make use of that Scene or in any of the EventTrigger actions. The point is I don’t want to display the scene’s tile or any property at all. I just want a button on a page to trigger the scene and that’s all. But I’m lost and can’t see how to accomplish this. Feeling like a total noob atm using scenes.

What do I miss? It seems maybe I did not understood the concept

You will still use the Clicked EventTrigger. There was an example attached at the top you can look at. In it, you will see that the Clicked EventTrigger in SceneTile.xaml calls a DataAction on the Scene attribute which manually triggers the scene.

Just enter the actual scene name in the Binding field of the DataAction. So e.g. for two buttons on a page:
DataAction Binding for button1: scene1.Scene
DataAction Binding for button2: scene2.Scene

You can leave Value always empty. To trigger a scene just create a DataAction with sceneName.Scene in the Binding field (sceneName is the actual name of the Scene).

So there are a lot of possibilities to trigger a scene.

1 Like

You made my day. Works perfectly and very easy explained