Skip to content
This repository has been archived by the owner on Feb 9, 2023. It is now read-only.

Commit

Permalink
Update to power switch controls
Browse files Browse the repository at this point in the history
Add optional allowance for 'turn on THE <switch>' in addition to 'turn on <switch>'
  • Loading branch information
mpember authored May 3, 2018
1 parent 34df7f9 commit 45a0600
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/modules/powerswitch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand Down

0 comments on commit 45a0600

Please sign in to comment.