If I turn off/on the switch, everything is working good, but when the variable’s value change, the switch it is not changing… Anyone knows how can I achieve this to work?
On/Off, depends of the tablet’s screen. If the tablet will turn off, the variable will be off. If the tablet turn on, the variable will be on.
The problem is that the switch it is not acting like the tamplate’s value is telling…
So… what do you say is that the template for command_line will evaluate to “true” not to “on” as well? I ask this because I have some other custom template swtiches where everything is ok, with the same code…
Edit: Still not working, even with “{{ is_state(‘variable.computer_tablet_screen’, ‘on’) }}”