summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ShellyPy/wrapper.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/ShellyPy/wrapper.py b/ShellyPy/wrapper.py
index adb34e4..2d49f79 100644
--- a/ShellyPy/wrapper.py
+++ b/ShellyPy/wrapper.py
@@ -137,6 +137,14 @@ class Shelly:
except JSONDecodeError:
raise BadResponse("Bad JSON")
+ def status(self):
+ """
+ @brief returns status response
+
+ @return status dict
+ """
+ return self.post("update")
+
def settings(self, subpage = None):
"""
@brief returns settings
@@ -214,7 +222,7 @@ class Shelly:
if duration is not None:
values["duration"] = duration
- return self.post("roller/{index}".format(index), values)
+ return self.post("roller/{}".format(index), values)
def light(self, index, *args, **kwargs):
@@ -273,8 +281,8 @@ class Shelly:
if brightness is not None:
values["brightness"] = brightness
- return self.post("light/{index}".format(index), values)
+ return self.post("light/{}".format(index), values)
+
+ def emeter(self, index, *args, **kwargs):
- def emeter(self, i, *args, **kwargs):
- #TODO
- return
+ return self.post("emeter/{}".format(index))