Hi there, I have a motion sensor lamp in my garden. This lamp is switched completely on/off with a Fibaro Single switch 2:
Fibaro switch on: motion detected --> Light on
Fibaro switch off: no motion detection because of no current on the whole lamp.
When the light is on, after detected motion, then the Fibaro switch tell me the actual current and power comsumption.
How can I count, how often the lamp was on ? The easiest way is to count how many times the power comsumption was over 2W. because: Lamp off: 0.1W Lamp on: 15W.
I want to have a simple Number in HABpanel which say for example: Lamp on: 3x.
I did a rule for that, and a Item “GARTENLICHTZAEHLER” type Number… but I get this error:
[ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Bewegungen Garten zählen': Unknown variable or command '>'; line 6, column 13, length 41
rule "Bewegungen Garten zählen"
when
Item zwave_device_512_node20_meter_watts1 received update
then
if (zwave_device_512_node20_meter_watts1 > 10)
GARTENLICHTZAEHLER.postUpdate((GARTENLICHTZAEHLER.state as Number) + 1)
end
if (zwave_device_512_node20_meter_watts1.state > 10) {
if (GARTENLICHTZAEHLER.state == NULL) {GARTENLICHTZAEHLER.postUpdate(0)}
GARTENLICHTZAEHLER.postUpdate((GARTENLICHTZAEHLER.state as DecimalType) + 1)}