Rule works with physical switch but not Dashboard app

,

I changed the template to a button and then touching it on my iPhone or clicking it on my Mac did literally nothing. It didn't change to on or off, etc.

I also tried the switch template, and it does act like the dimmer, as you anticipated, i.e. the LED goes on and off and inside the device it says on or off, but the rule turning the fan and light on or off doesn't run.

To check the events I used the dashboard to turn on the switch at 6:55. It did register In the Events for the parent for it.

BTW, I'm in Orlando, but I typically stay up to 11-12 o'clock.

Did you select the appropriate button numbers and commands (and device) for the button on Dashboard? Sounds like button 1 with pushed and held commands (you'd need one tile for each--tapping the dashboard button sends the command (the dashboard button itself won't let you do holds by holding it, just wherever event is specified).

Well... If I would need a button for on and a button for off that is two button pushes. As such, I might as well not create at dashboard tile at all and just tap the light and fan tiles I already have on the dashboard. So I guess we are at a dead end, but it seems there should be a way to transmit what is being done by the dashboard because inside the device UI I can see that the state of the switch is changing from on to off and vice versa and it is generating appropriate events. So it seems like a Hubitat programming issue. I'm just guessing, that this is such a relatively low priority that they haven't (and maybe never will) get to this. In my case I'm just controlling 2 devices, but somebody might want to do more at once. Which gives me a possible idea - could I create a virtual room that has the fan and light in it and put that fake room inside the dashboard for my Master Bedroom and then would it work if I turned the room on and off from there? (Is there even such a thing as a room template?)

Possibly. If you want to respond to switch on or off events, you can't do that with Button Controller. Button Controller is effectively a way to create rules that respond to button events (pushed, held, etc. as a "trigger"). If you want to ewspons to the switch events instead, which is all you'll get if you turn on or off the switch from dashboard or any digital means, you'll need something else--perhaps a rule triggered by the switch events.

Thanks for all your help and hanging in there. I got it to mostly work.

If any saw my "solution" yesterday (06/19/2023) it turns out if was incorrect. After a couple of days of living with my latest attempts I think I have it solved.

Just to recap what I was trying to do in a nut shell, with my Inovelli Fan+Light switch, if I turn on just the ceiling fan or light then it will set the switch to the right of it to 50% (which sets the LED to 50% as it is an Inovelli Red Dimmer). If they are both on the right side switch turn on to 100%. On the other hand, if I turn the ride side switch on or off it turns both the ceiling fan and light on or off.

I think the problem I had is that the apps couldn't tell who was sending the commands. That is, I needed to distinguish if I was turning the ceiling fan or light on from that side and then adjusting the Right Side switch LED vs. wanting to turn them both on or off by pushing the Right Side switch.

What I did is to create a global variable that gets set depending on which of the 3 switches was pushed. Since I just worked through the logic (and also corrected some mistakes where I had picked the wrong fan and left out some parens) I'm not 1,000% sure, but I think I needed to add a 1 second delay before resetting my "which pushed" variable. I think if I didn't have that in there it might get reset to "None" before the other switches get effected and so they don't detect which switch initiated the process. That is, if the variable From_Which_SK_Bedroom_Switch gets reset to "None" before turning on or off the other switches, then if defeats the whole purpose of setting that variable as a flag. (One other BTW, I know "real" programmers would have done it as fromWhichSKBedroomSwitch but I find putting in the "_" and starting with a capital letter is much more readable. Plus, the first small letter is a holdover from when we used to add that to show the variable type. So as this is a string it would have been strFromWhichSKBedroomSwitch).

So there are actually now 6 rules. One rule each for turning each of the 3 on or off. For the Right Side switch on/off rules I have 2 triggers: the switch turned on or off and button 1 pushed or held.

This is the Rule Machine rule for turning the right switch on or off (which is to turn both the ceiling fan and light on or off).

This one is turning the Ceiling Fan On:

This one is turning the Ceiling Fan Off:

This is turning the Ceiling Light On:

This is turning the Ceiling Light Off:

BTW, the reason for the 2 triggers for the Right Side switch was because I might turn the fan and light on by pushing the Right Side switch. So far, so good. But what if I then turn off just the fan or light and then want to turn them both on by pushing the Right Side switch?

Using the trigger of "when Right Side switch turns on" doesn't work because the switch is already on. Likewise, using "Changed" doesn't work it, as it hasn't "changed". I thought about making the Right Side switch trigger just a button 1 "pushed" or "held" which would solve this problem if I'm doing it from the physical switch, but then the dashboard button for the Ride Side switch won't work - which is where this all started from. Ah, but then I had an epiphany of making them both a trigger. i.e. If either the Right Side switch turns on OR the Right Side switch button 1 is pushed. That seems to work just fine.

Here is a screenshot for the Right Side Switch turning On or its Button 1 being Pushed:

Here is a screenshot for the Right Side Switch turning Off or its Button 1 being Held:

1 Like

One last thing for this thread: I consolidated this to 3 rules if anyone likes that better:

Here is the rule for when I push either the Ceiling Fan or Light switch which runs whenever the ceiling light or fan is changed.

Here is the rule when I've either turned on the Ride Side Switch or Push button 1. Although that seems to be the same thing, it was needed to put both in to get it to run from both the physical switch and the dashboard.

Finally here is the rule when the Right Side Switch is turned off. Again, both triggers are needed so it works from the physical switch and a dashboard.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.