Fibaro Dimmer 2 - set dimmer value

hey guys

i would like to write a rule, which sets the dimmer value in the background.
my idea is to set the dimmer value to 10% at 2am, so that i will turn off the swtich after 2 am i will have only a light with 10% brightness. and at 8am i would like to set it to 100%.
i dont get the code for it. my last code was

Treppenhaus_Licht.sendCommand(10)
Treppenhaus_Licht.send(OFF)

but this turns the light on for 1sec. i would like to avoid this
does someone have any ideas for it?

thanks

Post your full rule. The important part is how your rule triggers.

rule "10% at 02:00"
when
    Time cron "0 0 2 * * ? *"
then
    Treppenhaus_Licht.sendCommand(10)
end

rule "100% at 08:00"
when
    Time cron "0 0 8 * * ? *"
then
    Treppenhause_Licht.sendCommand(100)
end

the problem is not the trigger, because i do not want to send the command “sendCommand” at this time, i would like to send a command like “setValue” 80%, because i trigger the light with the switch.

is there a command/method/property for the this like Treppenhaus_Licht.setDimmerValue = 80 ??

i already found like Treppenhaus_Licht.send(PercentType.valueOf(“18”)), but after turning the switch on, the dimming value was the last one so not 10%

Treppenhaus_Licht.sendCommand(80)

That is a limitation of your device. There is nothing that OH can do to fix that for you. When you manually trigger the light OH is out of the loop. It has no way to restore the dimming value to its last state.

i think i was to unclear in my first description.

OH is doing everything correctly with this command:

Treppenhaus_Licht.sendCommand(80)

but i’m looking for something different, because when my rule is like:

rule "Treppenhaus in der Nacht dimmen"
when
Time cron "0 0 0 * * ? *"
then
logInfo(“RULE”, “Treppenhaus Licht gedimmt auf 10%”)
Treppenhaus_Licht.sendCommand(10)
end

then the light will be turn on, which i do not want. i just want, that the value 10 will be passed to the dimmer module and if i go to th toilett and turn the light on with the switch, the light will be turned on but only with a dimm value of 10%
?

so that i’m looking for something like:
Treppenhaus_licht.setValue =10

That cannot be done.

The FGD212 can be configured to use scenes: one click 100%, double click 10% …

Trigger would be:

...
when
    Item FibFGD212_1_Num changed to 14
then
...
1 Like