Only the Event “received update” is fired when i push the Switch Up and the Light is still on.
so i Need a trigger with the Event “reveived update ON”.
In this trigger the state gives always “on”;
but i Need the state before i push the Switch
it can be “on”, when the light was still on OR “on” when the light was “off” an turned to “on”
rule xxx
when
Item sw received update ON
==> sw.state
then
Any Idea how i can get the state of the Switch it was before entering the trigger?
As I know for this there is no real solution for this. We have to wait for a PR which I requested that previousState of item really reflects this state. At the moment mostly it is the same as the current state
Please describe your setup and what you want to achieve. Maybe the solution is different from what you have as idea to realize your goal.
Command to program the switch to toggle.
set HM-LC-Sw1PBU-FM regSet intKeyVisib visib
set HM-LC-Sw1PBU-FM getConfig
set HM-LC-Sw1PBU-FM regSet shActionType jmpToTarget self01
set HM-LC-Sw1PBU-FM regSet shSwJtOn dlyOff self01
set HM-LC-Sw1PBU-FM regSet shSwJtOff dlyOn self01
set HM-LC-Sw1PBU-FM regSet shSwJtDlyOn on self01
set HM-LC-Sw1PBU-FM regSet shSwJtDlyOff off self01
set HM-LC-Sw1PBU-FM regSet shActionType jmpToTarget self02
set HM-LC-Sw1PBU-FM regSet shSwJtOn dlyOff self02
set HM-LC-Sw1PBU-FM regSet shSwJtOff dlyOn self02
set HM-LC-Sw1PBU-FM regSet shSwJtDlyOn on self02
set HM-LC-Sw1PBU-FM regSet shSwJtDlyOff off self02
Set back to default.
set <device> regSet shSwJtOn dlyOff self01
set <device> regSet shSwJtOff off self01
set <device> regSet shSwJtDlyOn off self01
set <device> regSet shSwJtDlyOff off self01
set <device> regSet shSwJtOn on self02
set <device> regSet shSwJtOff dlyOn self02
set <device> regSet shSwJtDlyOn on self02
set <device> regSet shSwJtDlyOff on self02
"Schalter immer toggeln lassen"
Im Werkszustand schaltet die Wippe bei Druck auf der einen Seite ein, auf der anderen Seite aus. Möchte man, dass bei jedem Tastendruck einfach der Zustand geändert wird, kann man das wie folgt erreichen (unten nur für den kurzen Tastendruck dargestellt): "
Do you have an idea, how or where to execute the set Statements?