For several versions I stopped working a switch that I have bluetooth nuc, ubuntu + docker + ha, some solution, the ssh console works
- platform: command_line
switches:
bluetooth:
friendly_name: 'Bluetooth'
command_on: 'ssh [email protected] "systemctl start bluetooth.service"'
command_off: 'ssh [email protected] "systemctl stop bluetooth.service"'
command_state: 'ssh [email protected] "systemctl status bluetooth.service --full" | grep -oPc "(Active: active)"'
value_template: '{{ value == "1" }}'```