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 :-)
This commit is contained in:
Jean Gauthier 2019-02-05 05:26:28 -05:00 committed by Pascal Vizeli
parent ef6b0b8e0b
commit aa4a3d8b96

View File

@ -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}