Restore Previous Dimmer Setting for Plugin Dimmer [solved]

Posted on
Wed Feb 07, 2018 5:28 pm
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Restore Previous Dimmer Setting for Plugin Dimmer [solved]

I'm working on a plugin-supported dimmer device (it's part of a group device if that makes a difference.) The dimmer is working without error, so I think it's properly instantiated. It responds to TurnOn, TurnOff, DimBy, Toggle, SetBrightness, and RequestStatus. Turn on dimmer device, brightness=100. Set brightness to some other level, say brightness=50. The Indigo UI responds properly and the UI value is correct. Turn the device off. Turn the device on again and it goes back to brightness=100. What I would like is for brightness to be the last brightness level.

Is there a way to do this natively or to send a desired brightness level to the device when TurnOn is called?
Last edited by DaveL17 on Wed Feb 07, 2018 9:07 pm, edited 1 time in total.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Wed Feb 07, 2018 5:36 pm
Colorado4Wheeler offline
User avatar
Posts: 2794
Joined: Jul 20, 2009
Location: Colorado

Re: Restore Previous Dimmer Setting for Plugin Dimmer

if you just do setBrightness it should just turn it on to that brightness if it's off, you shouldn't need to do an On and Brightness together.

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Wed Feb 07, 2018 7:24 pm
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Restore Previous Dimmer Setting for Plugin Dimmer

I should be more clear. When you push the Turn On button in the Indigo UI, it always goes to 100.

Screen Shot 2018-02-07 at 7.21.29 PM.png
Screen Shot 2018-02-07 at 7.21.29 PM.png (29.82 KiB) Viewed 691 times

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Wed Feb 07, 2018 9:22 pm
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Restore Previous Dimmer Setting for Plugin Dimmer [solve

LMGTFY

Code: Select all
dev = indigo.devices[123]
dev.onBrightensToLast = True
dev.replaceOnServer()


Helps to search for the right thing.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests