Added comment to explain the reasons for sudo in the switchbot plugin
This commit is contained in:
parent
933940c695
commit
f8506d6d25
1 changed files with 4 additions and 0 deletions
|
@ -100,6 +100,10 @@ class SwitchSwitchbotPlugin(SwitchPlugin):
|
||||||
errors = []
|
errors = []
|
||||||
|
|
||||||
try:
|
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((
|
output = subprocess.check_output((
|
||||||
'sudo python3 -m platypush.plugins.switch.switchbot ' +
|
'sudo python3 -m platypush.plugins.switch.switchbot ' +
|
||||||
'--device {} ' +
|
'--device {} ' +
|
||||||
|
|
Loading…
Reference in a new issue