Added comment to explain the reasons for sudo in the switchbot plugin

This commit is contained in:
Fabio Manganiello 2018-06-11 22:41:20 +02:00
parent 933940c695
commit f8506d6d25
1 changed files with 4 additions and 0 deletions

View File

@ -100,6 +100,10 @@ class SwitchSwitchbotPlugin(SwitchPlugin):
errors = []
try:
# XXX this requires sudo and it's executed in its own process
# because the Switchbot plugin requires root privileges to send
# raw bluetooth messages on the interface. Make sure that the user
# that runs platypush has the right permissions to run this with sudo
output = subprocess.check_output((
'sudo python3 -m platypush.plugins.switch.switchbot ' +
'--device {} ' +