#11 Energieverbrauch näherungsweise berechnen

This commit is contained in:
David Zingg 2019-11-25 21:03:25 +01:00
parent 6b041d7cca
commit 1ec0b46060

View File

@ -87,7 +87,7 @@ class MyStromSwitchPlugin(octoprint.plugin.SettingsPlugin,
# Energy in Wh
self.energy = self.energy + (intervall * data["power"] / 3600)
self.lastTimeStamp = timestamp
data["energy"] = self.powerConsumed
data["energy"] = self.energy
data["onOffButtonEnabled"] = self.onOffButtonEnabled
self._plugin_manager.send_plugin_message(self._identifier, data)
except (requests.exceptions.ConnectionError, ValueError):