But how did Yves911 get on and off in his graph?
At the moment I use boolean, but this shows as true and false.
I want to display the state of my dryer as on and off and not true or false.
-
Display string values in graph from logwatcher plugin
-
Ah ok, this would solve my issue.
How can I use labels?
There is nothing in the device-config-schema. -
@mwittig said:
Yves911 used a boolean attribute with “on” and “off” labels.
Actually it’s not the case the on/off value you can see in my graph is simply a switch state nothing more
pimatic rocks!
-
@Yves911 Well, the switch state actually is a boolean attribute witth “on” and “off” labels
attributes: state: description: "The current state of the switch" type: t.boolean labels: ['on', 'off']
As far as I know it is only possible to graph boolean and number attributes.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
I added it to the config, but I can’t see the labels.
Maybe the plugin needs to be modified?{ "id": "sensortrockner", "name": "Trockner", "class": "LogWatcher", "file": "/tmp/logfile.txt", "attributes": [ { "name": "state", "type": "boolean", "labels": [ "Läuft", "Aus" ] } ], "lines": [ { "match": ".*Nachricht:Sensor2: 0 .*", "state": true }, { "match": ".*Nachricht:Sensor2: 1 .*", "state": false } ] },
-
@Xento I have reviewed the source code of pimatic-log-reader. Unfortunately, the current implementation does handle labels
I will prepare a pull request for it. So, hopefully there will be a new version soon.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
Added PR https://github.com/pimatic/pimatic-log-reader/pull/3
@Xento If you are familiar with git and you wish to try the changes before the update will be released you can checkout https://github.com/mwittig/pimatic-log-reader.git
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
@mwittig Yeah I know git. I contributed to some plugins already. I added the boolean support to the log-reader plugin
-
@Xento Ah, ok. Sorry for fixing it on your behalf then
May be you should ask to be added to the developer group. See http://forum.pimatic.org/topic/471/pimatic-devs-developers-group
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law