#11 Energieverbrauch näherungsweise berechnen
This commit is contained in:
parent
6b041d7cca
commit
1ec0b46060
@ -87,7 +87,7 @@ class MyStromSwitchPlugin(octoprint.plugin.SettingsPlugin,
|
|||||||
# Energy in Wh
|
# Energy in Wh
|
||||||
self.energy = self.energy + (intervall * data["power"] / 3600)
|
self.energy = self.energy + (intervall * data["power"] / 3600)
|
||||||
self.lastTimeStamp = timestamp
|
self.lastTimeStamp = timestamp
|
||||||
data["energy"] = self.powerConsumed
|
data["energy"] = self.energy
|
||||||
data["onOffButtonEnabled"] = self.onOffButtonEnabled
|
data["onOffButtonEnabled"] = self.onOffButtonEnabled
|
||||||
self._plugin_manager.send_plugin_message(self._identifier, data)
|
self._plugin_manager.send_plugin_message(self._identifier, data)
|
||||||
except (requests.exceptions.ConnectionError, ValueError):
|
except (requests.exceptions.ConnectionError, ValueError):
|
||||||
|
Loading…
Reference in New Issue
Block a user