mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
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:
parent
ef6b0b8e0b
commit
aa4a3d8b96
@ -114,7 +114,4 @@ class Ted5000Gateway:
|
|||||||
voltage = int(doc["LiveData"]["Voltage"]["MTU%d" % mtu]
|
voltage = int(doc["LiveData"]["Voltage"]["MTU%d" % mtu]
|
||||||
["VoltageNow"])
|
["VoltageNow"])
|
||||||
|
|
||||||
if power == 0 or voltage == 0:
|
self.data[mtu] = {'W': power, 'V': voltage / 10}
|
||||||
continue
|
|
||||||
else:
|
|
||||||
self.data[mtu] = {'W': power, 'V': voltage / 10}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user