From cb3e6519838af99a59a65e5b61cae48ad0cabe04 Mon Sep 17 00:00:00 2001 From: Hauke Petersen Date: Thu, 15 Sep 2022 09:40:22 +0200 Subject: [PATCH] verbump to 0.0.5 --- setup.py | 2 +- steckie/steckie.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/setup.py b/setup.py index e5a5d07..e4c12f5 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ import setuptools name = "steckie" -ver = "0.0.4" +ver = "0.0.5" desc = 'Read state from Tasmota smart plugs' setuptools.setup( diff --git a/steckie/steckie.py b/steckie/steckie.py index 5c19113..a3d2e13 100755 --- a/steckie/steckie.py +++ b/steckie/steckie.py @@ -96,14 +96,14 @@ class Steckie(Deichapp): now_local = now.astimezone(pytz.timezone("Europe/Berlin")) last_local = cnt["last"].astimezone(pytz.timezone("Europe/Berlin")) if now_local.date().year != last_local.date().year: - self.cnt["year"] = total - self.cnt["month"] = total - self.cnt["day"] = total + cnt["year"] = total + cnt["month"] = total + cnt["day"] = total elif now_local.date().month != last_local.date().month: - self.cnt["month"] = total - self.cnt["day"] = total + cnt["month"] = total + cnt["day"] = total elif now_local.date().day != last_local.date().day: - self.cnt["day"] = total + cnt["day"] = total cnt["last"] = now # write data to DB