Dimmer on bright


(Eric R) #1

I had a WAF issue recently where she didn’t like that the dimmer turned on to the previous dim level. She wants it to turn on to the full level whenever she turns it on. So, I wrote this app. I hope someone else finds it useful as well.

/**
 *  Turn on bright
 *
 *  Copyright 2015 Eric Roberts
 *
 *  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 *  in compliance with the License. You may obtain a copy of the License at:
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
 *  on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
 *  for the specific language governing permissions and limitations under the License.
 *
 */
definition(
    name: "Turn on bright",
    namespace: "baldeagle072",
    author: "Eric Roberts",
    description: "When the dimmer turns on, it goes to bright level instead of previous dimmed level",
    category: "Convenience",
    iconUrl: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience.png",
    iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience@2x.png",
    iconX3Url: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience@2x.png")


preferences {
	section("Dimmer to make bright when turned on") {
		input "dimmer", "capability.switchLevel", title: "Which dimmer?"
	input "brightness", "number", title: "Light Level"
	}
}

    

def installed() {
    	log.debug "Installed with settings: ${settings}"
initialize()
}

def updated() {
	log.debug "Updated with settings: ${settings}"
unsubscribe()
initialize()
}

def initialize() {
    subscribe(dimmer, "switch.on", onHandler)
 }

def onHandler(evt) {
	dimmer.setLevel(brightness)
    log.debug "setting brightness: $brightness"
}

Guestproof dimmer solution?
Lights flashing
GE Dimmer Switches: Default to full brightness?
Reset dimmers to 100%
(Edward Pope) #2

Thank you so much, I actually have a good use for this (SMILE)


(Eric R) #3

Just out of curiosity… @theedpope - what might that use be?


(Morgan) #4

I’m going to try this baldeagle, I had installed a GE dimmer because i didn’t have a neutral and none of the kids or wife liked it and just wanted it to turn on bright. It helped after I had adjusted the ramp up rates to faster, but still wasn’t great. I had to finally switch it out. I’m going to try this now though.


(Cody Truscott) #5

Thanks! Another todo crossed off my list.


#6

Seek and Ye shall find! Thanks for the code.


(S H) #7

Sorry to reply to an old thread but this is what I was looking for. I am a smart thing newbie and would like to know how to use this smart app. i have successfully copied the code, saved it, and published it for myself. So now what?

I want to have my master bedroom dimmer switch (linear WD-500Z) turn on at 100% when I turn it on locally (not remotely). how do i use this app for that purpose? i went to marketplace then My Apps and then this smart app. I set the dimmer to Master Bedroom Dimmer, light level to 100, and assigned it a name Master Full. This is where I am stuck. What do I do next?

Thanks for your patience for this newbie.


(Ray) #8

Go and try it out. Sometime there is a delay due to the cloud service.
The other option you have is the build in smart lighting apps. You can set it to turn on full bright when turn on with the same switch. Unfortunately this is for both local and remote.


(Eric R) #9

This smartapp also does not work for every type of switch. I’m not sure if the linear will work or not. You will have to experiment with it. It depends on how the switch reports to ST.


(S H) #10

Which built in smart app are you talking about?


(Ray) #11

In your ST phone app. There is a smartapp called Smart Lighting.

Edit : example


(S H) #12

i tried those exact settings and it didn’t work.

Then i thought about it, and even if it did work I can’t use it because what if I want to press and hold to turn on a light at a low dim level. Wouldn’t it turn it on at 100% anyways?

Just disappointed that I am moving from old x10 Leviton switches and have yet to find comparable z-wave switches that will:
have programmable preset level
press and hold to turn up light at a low level (overriding preset level)
double tap to quickly go to 100% (overriding preset level)
All done locally without a hub.


(Ray) #13

Pressing down shouldn’t being it to full bright. You could do all of the above with rule machine if you still have it.


(S H) #14

What I meant was that if say early in the morning and I want to turn on the light by pressing and holding the up button just enough to get a very low dim level, won’t it still turn it on full brightness?

I just got started with Z wave and ST and have read about Rule Machine but it seems like it has been removed and so can’t find it anywhere. Not sure why it was removed.


(Ray) #15

You can set a condition to only work between x to y time or by mode or both.