I want to display value of count_motion
Have tried both, adding varialbe at end of number item and using number item in rules.
However was not successful in getting this work.
Would appriciate any hint/help to get that working
Thanks
Jens
demo.rules
count_motion = count_motion + 1
// ++++does not work ++++v
Motion_count.state = count_motion
demo.item
// ++++ does not work ++++++++++++++++v
Number Motion_count “Motion [%d]” { var=“count_motion as DecimalType” }
As you want to display the variable, why not use the item itself as variable? The only downside is the more complex way to update the item compared to the variable: Motion_Count.postUpdate(Motion_Count.state as DecimalType + 1)
refer to it with Motion_Count.state as DcimalType wherever you need the counter in the rule.