-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from sinricpro/feature/custom-devices
Custom device implementation and bug fixes
- Loading branch information
Showing
6 changed files
with
37 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
""" | ||
* Copyright (c) 2019 Sinric. All rights reserved. | ||
* Licensed under Creative Commons Attribution-Share Alike (CC BY-SA) | ||
* | ||
* This file is part of the Sinric Pro (https://github.com/sinricpro/) | ||
""" | ||
|
||
from ._jsoncommands import JSON_COMMANDS | ||
|
||
class ModeController: | ||
def __init__(self, x): | ||
self.instanceId = '' | ||
|
||
|
||
async def setMode(self, jsn, callback): | ||
self.instanceId= jsn.get("payload").get(JSON_COMMANDS['INSTANCE_ID'], '') | ||
return callback(jsn.get("payload").get(JSON_COMMANDS.get('DEVICEID')), jsn.get("payload").get('value').get('mode'), self.instanceId) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters