Make UniFi bandwidth sensors be about current transfer rather than total transfer (#64701)

This commit is contained in:
Robert Svensson 2022-01-24 13:50:54 +01:00 committed by GitHub
parent 11fa86cc83
commit 597fca9072
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 10 deletions

View file

@ -44,16 +44,16 @@ async def test_bandwidth_sensors(hass, aioclient_mock, mock_unifi_websocket):
"is_wired": True,
"mac": "00:00:00:00:00:01",
"oui": "Producer",
"wired-rx_bytes": 1234000000,
"wired-tx_bytes": 5678000000,
"wired-rx_bytes-r": 1234000000,
"wired-tx_bytes-r": 5678000000,
}
wireless_client = {
"is_wired": False,
"mac": "00:00:00:00:00:02",
"name": "Wireless client",
"oui": "Producer",
"rx_bytes": 2345000000,
"tx_bytes": 6789000000,
"rx_bytes-r": 2345000000,
"tx_bytes-r": 6789000000,
}
options = {
CONF_ALLOW_BANDWIDTH_SENSORS: True,
@ -84,8 +84,8 @@ async def test_bandwidth_sensors(hass, aioclient_mock, mock_unifi_websocket):
# Verify state update
wireless_client["rx_bytes"] = 3456000000
wireless_client["tx_bytes"] = 7891000000
wireless_client["rx_bytes-r"] = 3456000000
wireless_client["tx_bytes-r"] = 7891000000
mock_unifi_websocket(
data={