From e88bfda2a8af58b5aa6b6a9da955cc5bb593db3d Mon Sep 17 00:00:00 2001 From: Alexxander0 <26937883+Alexxander0@users.noreply.github.com> Date: Mon, 6 Jan 2020 22:23:26 +0100 Subject: [PATCH] Fix AVM FRITZ!DECT switch total consumption (#30478) actor.get_energy() returns Wh, so division by 1000 is correct --- homeassistant/components/fritzdect/switch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/fritzdect/switch.py b/homeassistant/components/fritzdect/switch.py index cc629c54dc3..f67c84ae552 100644 --- a/homeassistant/components/fritzdect/switch.py +++ b/homeassistant/components/fritzdect/switch.py @@ -209,7 +209,7 @@ class FritzDectSwitchData: try: self.state = actor.get_state() self.current_consumption = (actor.get_power() or 0.0) / 1000 - self.total_consumption = (actor.get_energy() or 0.0) / 100000 + self.total_consumption = (actor.get_energy() or 0.0) / 1000 except (RequestException, HTTPError): _LOGGER.error("Request to actor failed") self.state = None