I am fully aware of this topic being quite necrotic and the developer has not been around for long time, but still going to ask my question.
I am trying to use the .status variable in a rule to see if the UPS is in an alarm state. If so, the alarm message will be displayed. Else the variablesDevice will display a
" - ". But now I have refreshed the battery cartridge the message says
"undefined", not quite stylish. Actually almost the same wish the author has with his
I have tried all kinds of rules:
$sys_tool_UPSinfo.status = true and
$sys_tool_UPSinfo.status = 1 also
$sys_tool_UPSinfo.status = "true" just as
$sys_tool_UPSinfo.status = "OL"and finally
$sys_tool_UPSinfo.status = "on line"
The first one throws an error, the rest just never comes out as
TRUE. I tried to take la look at the coffee script on github to see if I could get useful information from there. In line 81 it clearly state the .state variable is a Boolean. Why can’t I check the state of that Boolean in a rule?
And in related questions: when I use the NUT-device in pimatic I see the fruits of the developers question above. The status writes either
"on line" or
"on battery". But when I use a variablesDevice to display the values (just so I can calculate the remaining time in minutes, that sort of stuff) I get good old
"false". How does that work?