Video - Mode Manager

This video walks you through setting modes using Mode Manager using time of day, presence and even a button controller.


Can an Amazon Alexa device be used to change modes? Instead of a bedside remote, I’d prefer to simply say “Alexa, good night” to change the mode to Night. And in the morning, simple say “Alexa, good morning” to change the mode to Day.


I use a virtual switch named “house”, Alexa turn the house off…
Others will chime in I’m sure with alternatives…



Thanks for the quick reply. Does the virtual switch interact with “Mode Manager” directly? Or is “Rule Machine” used? Or something else?



1 Like

its just a typical virtual switch, so you can do whatever you want with it, i have it wired directly to my goodnight rule
mode manager is the “simple” mode changing app, currently supporting buttons and presence as inputs for mode changes.
More advanced conditions and device inputs would be handled via rule machine.



BTW - How long does shipping typically take? :grinning:


In my BC app I use the following code in ST that is not working in Hubitat:

def changeMode(mode) {
	log.debug "Changing Mode to: $mode"
	if (location.mode != mode && location.modes?.find { == mode }) setLocationMode(mode)

Any advice?

So using the logs I realized that the “mode” input was passing
instead of what ST passes

Changing the my code to the following worked but I doubt this is the recommended syntax.
I have no formal or informal developer training. I just hack stuff together using the smartThings documentation and some common sense…so any advice is appreciated.

def changeMode(mode) {
	log.debug "Changing Mode to: $mode"
	if (location.mode != mode && location.modes?.find { == mode[0] }) setLocationMode(mode)

On the input where the app gets the mode, is it set with multiple:true? If so, it yields a list [mode]. If not, it should yield just the mode. If you didn’t have multiple:true, I think that would be a bug that we should fix. For the multiple:true case, you do

if(location.mode in mode) …

Multiple:true was not set so this looks like it might be a bug.

Line 217