From aa4a3d8b9618d31fdfae69201c01983eb476b862 Mon Sep 17 00:00:00 2001 From: Jean Gauthier Date: Tue, 5 Feb 2019 05:26:28 -0500 Subject: [PATCH] Modifying MTUs acquisition (#20654) **Description:** I modified the file because it should not disable a MTU based on voltage or power. If one has programmed a certain amount of MTUs in his Gateway, they should be all visible and show 0W or 0V. The problem arises when you have a device that shuts off at night (e.g.: pool pump). It pulls 0W for a while, I don't want my interface to show a big yellow error during that time because the sensor no longer exists. Even the 0V is not a good idea because we can use it to indicate the breaker has tripped. Hopefully it would be accepted :-) --- homeassistant/components/sensor/ted5000.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/homeassistant/components/sensor/ted5000.py b/homeassistant/components/sensor/ted5000.py index a6ea7cbd534..82a1ec8bb68 100644 --- a/homeassistant/components/sensor/ted5000.py +++ b/homeassistant/components/sensor/ted5000.py @@ -114,7 +114,4 @@ class Ted5000Gateway: voltage = int(doc["LiveData"]["Voltage"]["MTU%d" % mtu] ["VoltageNow"]) - if power == 0 or voltage == 0: - continue - else: - self.data[mtu] = {'W': power, 'V': voltage / 10} + self.data[mtu] = {'W': power, 'V': voltage / 10}