mirror of
https://github.com/python-kasa/python-kasa.git
synced 2024-12-22 11:13:34 +00:00
Update pyHS100.py
This commit is contained in:
parent
89481ad06e
commit
ef85f939fd
@ -1,7 +1,11 @@
|
|||||||
import logging, socket, codecs, json
|
import logging
|
||||||
|
import socket
|
||||||
|
import codecs
|
||||||
|
import json
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class SmartPlug(object):
|
class SmartPlug(object):
|
||||||
"""Class to access TPLink Switch.
|
"""Class to access TPLink Switch.
|
||||||
|
|
||||||
@ -95,7 +99,6 @@ class SmartPlug(object):
|
|||||||
|
|
||||||
info = json.loads(response)
|
info = json.loads(response)
|
||||||
# info is reserved for future expansion.
|
# info is reserved for future expansion.
|
||||||
# The JSON response from the smartplug provide smartplug system information
|
|
||||||
sys_info = info["system"]["get_sysinfo"]
|
sys_info = info["system"]["get_sysinfo"]
|
||||||
relay_state = sys_info["relay_state"]
|
relay_state = sys_info["relay_state"]
|
||||||
return relay_state
|
return relay_state
|
||||||
|
Loading…
Reference in New Issue
Block a user