I’m running into a little issue with my current setup - I’m switching Ikea Tradfri-LED’s on and off via a Homematic switch. My rule looks like this:
rule "Badezimmer Taster"
when
Channel "homematic:HG-HM-PBI-4-FM:c29c40e4:OEQ0613601:1#PRESS" triggered SHORT
then
if (Dimmer_Ikea_Badezimmer.state > 0) {
Dimmer_Ikea_Badezimmer.sendCommand(0)
}
else {
Dimmer_Ikea_Badezimmer.sendCommand(100)
}
end
It looks like multiple rules exist. Where is the “Dimmer_Ikea_Badezimmer predicted to become 100” come from, I never saw that in my logfiles (as I recall).
By the way, Ikea dimmers also accept (OFF and ON) commands which might be better as in such case they remember their original dimming state so you can toggle between X% dimming and off.
there is only the one rule. It looks like this in my rules-file:
var dimmer = 100
rule "Badezimmer Taster"
when
Channel "homematic:HG-HM-PBI-4-FM:c29c40e4:OEQ0613601:1#PRESS" triggered SHORT
then
if (Dimmer_Ikea_Badezimmer.state > 0) {
Dimmer_Ikea_Badezimmer.sendCommand(0)
}
else {
Dimmer_Ikea_Badezimmer.sendCommand(dimmer)
}
end
I do have a variable there as I change the value over the course of the day (it’s at 10 from 23:30-06:00 for example). This is also the only rule with that specific trigger-channel.
The only thing I could think of is how the rule is structured - it does check if the bulb is dimmed at al (> 0) to turn the light off and only turns it on when it’s at 0 (else). Not sure if it’s stumbling over itself there somehow. Don’t know how to check it either to be frank.
Yup, I had it with ON and OFF before, but I don’t want them to remember their former dimming state when I press the button.
Actually the first two lines in the logfile are ok. It states the short press and the item receives 100 as argument.
The other lines are not originated from the rule I guess. How did you define the Dimmer_Ikea_Badezimmer item?