Dimmer shortcut in lights action


(David) #1

I like the new group lighting into one button. But would it be possible to add the function to start dimmed? I like my light dimmed in the morning as not to disturb my partner but I also want to be able to have another button that makes the light 100% when we are both awake.

Bedroom Morning - start at 10%
Bedroom Normal - start at 100%


(Tim Slagle) #2

Agreed! I would love to have the abolity to control brightness through the shortcuts on the dashboard. Would make it much more useful. As it is right now i hide the lights shortcut section on the dashboard at the very bottom because it is not as funtional as the “things” screen.


(The fish is still dead.) #3

Or maybe a tap and hold action that pops up a slider that lets you change the level?


(Hans Holm) #4

I like the tap and hold idea… The android Swiftkey keyboard uses a similar design for selecting the symbols ? ! . , under one key and it works great.


(Cassidy) #5

@Dbhjed - This could be done by creating a virtual switch that would fire off a smartapp that would start the lights dimmed to the preferred level.

Create two virtual switches named “Bedroom Morning” and “Bedroom Normal” with the following instructions -

Then create two smartapps with the following code -

preferences {
	section("Select virtual switch to monitor"){
		input "theSwitch", "capability.switch"
	}
	section("Which light(s) to dim in the bedroom:”) {
		input "switches", "capability.switchLevel", multiple: true
	}
    	section("Dim to this level..."){
    		input "lvl", "number"
    }
}

def installed()
{
	subscribe(app)
        initialize()
}

def updated()
{
	unsubscribe()
	subscribe(app)
        initialize()
}


def appTouch(evt) {
	log.info evt.value
    log.info "lvl: $lvl.value"
    switches.setLevel(lvl.value)
   
}

def onHandler(evt) {
	log.info evt.value
    log.info "lvl: $lvl.value"
    switches.setLevel(lvl.value)
    theSwitch.off()
}

def offHandler(evt) {
	log.debug "Received off from ${theSwitch}"
}

def initialize() {
	subscribe(theSwitch, "switch.On", onHandler)
	subscribe(theSwitch, "switch.Off", onHandler)
}

Then you can add the new virtual switches to the Lights & Switches category on the Dashboard.