aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan200101 <sentrycraft123@gmail.com>2022-11-04 23:25:16 +0100
committerJan200101 <sentrycraft123@gmail.com>2022-11-04 23:25:16 +0100
commitb4e1677bc8a4257c039a655db568b83186ae6c2f (patch)
tree432d98e1218e8df9c94f67062b8152b1719762c2
parent60e024c81b9b1872b0f5179275ef5b5fd417e890 (diff)
downloadShellyPy-b4e1677bc8a4257c039a655db568b83186ae6c2f.tar.gz
ShellyPy-b4e1677bc8a4257c039a655db568b83186ae6c2f.zip
correct Gen1 meter endpoint
it already works like this since the Shelly devices do ignore non digits after the index, but for the sake of sanity lets remove it https://shelly-api-docs.shelly.cloud/gen1/#shelly2-5-meter-index
-rw-r--r--ShellyPy/gen1.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/ShellyPy/gen1.py b/ShellyPy/gen1.py
index a75db98..de4a00f 100644
--- a/ShellyPy/gen1.py
+++ b/ShellyPy/gen1.py
@@ -101,9 +101,8 @@ class ShellyGen1(ShellyBase):
page += "/" + subpage
return self.post(page)
-
-
- def meter(self, index):
+
+ def meter(self, index):
"""
@brief Get meter information from a relay at the given index
@@ -111,7 +110,7 @@ class ShellyGen1(ShellyBase):
@return returns attributes of meter: power, overpower, is_valid, timestamp, counters, total
"""
- return self.post("meter/{}meter".format(index))
+ return self.post("meter/{}".format(index))
def relay(self, index, *args, **kwargs):
"""