From b4e1677bc8a4257c039a655db568b83186ae6c2f Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Fri, 4 Nov 2022 23:25:16 +0100 Subject: 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 --- ShellyPy/gen1.py | 7 +++---- 1 file 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): """ -- cgit v1.2.3