I’m sort of a beginner with programming but getting better every day. Still some things confuse me so much!
i have a rollershutter item:
Rollershutter BedroomCurtainMotorControl <blinds> { channel="mihome:curtain:abcxxxxx:curtainControl" }
the item works perfectly when sending commands like UP or DOWN.
I want to get its current state, 0% or 100% etc to perform certain actions in my rules.
But using something as simple as
if (BedroomCurtainMotorControl.state < 30) { do something }
or even just a logInfo
logInfo("INFO", BedroomCurtainMotorControl.state)
gives me a javascript error:
[ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Mijia & Aqara round Wireless Switch': An error occurred during the script execution: Could not invoke method: org.eclipse.smarthome.model.script.actions.LogAction.logInfo(java.lang.String,java.lang.String,java.lang.Object[]) on instance: null
all examples i see here on the forum on rollershutter rules use this rollershutter.state in their rules…
I’m probably missing some very basic thing here.
i can convert the state to string and get for example “0” or “100” but that cant be the way to use it, right?
in Paper UI the shutter’s state is displayed as expected: “position” 0% etc