Page 1 of 1

New Action(s): Toggling/switching between the predefined dim settings

Posted: Tue Sep 12, 2017 6:58 pm
by mikkot
Hi,

Now when I learned about the fact that you can actually store both brightness and color temperature values to dim1...dim4 presets for an IKEA lamp, I was left wondering how to implement this;
I want to use a NEXA wall switch to change between the dim1...4 settings. In more detail I'd like to have the ON button to go from dim1->dim2->dim3->dim4 (i.e. changing the preset with each button press) and the same thing but from dim4->dim3->dim2->dim1 using the OFF button.

Also would be nice to have a "dim preset toggle" by using only one single button to cycle thru the 4 presets.

I'd like to see it implement as 3 new Actions:
1. "next dim preset"
2. "previous dim preset"
3. "toggle between dim presets"

Would this get prioritised? :-)

Br,
Mikko

P.S. Obviously this would not only be Trådfri related, but a generic functionality for all the items having the 4 dim presets.

Re: New Action(s): Toggling/switching between the predefined dim settings

Posted: Wed Sep 13, 2017 8:21 pm
by stefangsbb
Ok, Mikko, now you are pushing it... :D

But this is actually a good idea, it is a common problem that you want to be able to step through a series of settings with one button.
My suggestion would be this: A CommandSequencer-Item with six configurable commands.
Then it has two actions: "next" and "previous". The "next"-action will run the next command in order until you reach the end and then keep doing the last command. If the last commands are empty it would stop at the last populated command. The "previous"-action would do the opposite.
Typically the first command would be the off-command, then the different dim-commands.

I almost finished implementing it, since it is very close to the scene-Item and I could inherit that...

Re: New Action(s): Toggling/switching between the predefined dim settings

Posted: Thu Sep 14, 2017 6:11 pm
by stefangsbb
There is now a CommandSequencer-Item in the nightly build. Try it out and see if it solves your problem.

Re: New Action(s): Toggling/switching between the predefined dim settings

Posted: Thu Sep 14, 2017 6:51 pm
by mikkot
Wow, this was fast! Cannot really complain about the service level now :)

Works like a charm!

Big Thanks!

BR,
Mikko