Data-bind do not work in my mixin_tab

I have created a new tab for Octoprint where I want to show 4 buttons when a boolean is true in settings and only two buttons and a textmessage when the boolean is false.

The buttons will be show and hide properly but the text message is allways hidden.

Here is my template:

I have tried to replace the variable for the text with an other observable and that works.
I have tried to make that observable computed with the inverse of the enableIR observabel, but when I try to call the enableIR() getter in the compute function the java script will stop working (the iframe used for testing will not load properly).

What could be the reason for this?

Bindings are a bit weird. If you just specify the binding directly, knockout will call it for you. But if you want to make it any kind of expression, knockout will stuff your binding into a function and execute that. So right now you are saying "if the observable is unset, make this text visible" - the observable is defined, so it is always set, and thus this will never become true.

Try !settings.settings.plugins.brightpi.enableIR() so that you won't negate the observable, but the value it holds.

Thanks a lot! It works.

It's a bit stange, because I thougt I already tried that, but I gues I did something else wrong when I did.

Thanks again.