aboutsummaryrefslogtreecommitdiff
path: root/ShellyPy/gen1.py
diff options
context:
space:
mode:
Diffstat (limited to 'ShellyPy/gen1.py')
-rw-r--r--ShellyPy/gen1.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/ShellyPy/gen1.py b/ShellyPy/gen1.py
index ea8c975..a75db98 100644
--- a/ShellyPy/gen1.py
+++ b/ShellyPy/gen1.py
@@ -101,6 +101,17 @@ class ShellyGen1(ShellyBase):
page += "/" + subpage
return self.post(page)
+
+
+ def meter(self, index):
+ """
+ @brief Get meter information from a relay at the given index
+
+ @param index index of the relay
+ @return returns attributes of meter: power, overpower, is_valid, timestamp, counters, total
+ """
+
+ return self.post("meter/{}meter".format(index))
def relay(self, index, *args, **kwargs):
"""
@@ -224,4 +235,4 @@ class ShellyGen1(ShellyBase):
return self.post("emeter/{}".format(index))
# backwards compatibility with old code
-Shelly = ShellyGen1 \ No newline at end of file
+Shelly = ShellyGen1