From 45a0600de7db03cd927d7735e88788b81d165e00 Mon Sep 17 00:00:00 2001 From: mpember Date: Fri, 4 May 2018 00:23:37 +1000 Subject: [PATCH] Update to power switch controls Add optional allowance for 'turn on THE ' in addition to 'turn on ' --- src/modules/powerswitch.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/powerswitch.py b/src/modules/powerswitch.py index 7b818237..59093428 100644 --- a/src/modules/powerswitch.py +++ b/src/modules/powerswitch.py @@ -57,6 +57,10 @@ def run(self, voice_command): self.processCommand(device, action) def processCommand(self, device, action): + if device.startswith('the '): + + device = device[4:] + if device in self.devices: code = int(self.config[device].get('code'))