fix aioasuswrt sometimes return empty lists (#18742)
* aioasuswrt sometimes return empty lists * Bumping aioasuswrt to 1.1.12
This commit is contained in:
parent
35690d5b29
commit
f6a79059e5
3 changed files with 6 additions and 6 deletions
|
@ -14,7 +14,7 @@ from homeassistant.const import (
|
||||||
from homeassistant.helpers import config_validation as cv
|
from homeassistant.helpers import config_validation as cv
|
||||||
from homeassistant.helpers.discovery import async_load_platform
|
from homeassistant.helpers.discovery import async_load_platform
|
||||||
|
|
||||||
REQUIREMENTS = ['aioasuswrt==1.1.11']
|
REQUIREMENTS = ['aioasuswrt==1.1.12']
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ class AsuswrtRXSensor(AsuswrtSensor):
|
||||||
async def async_update(self):
|
async def async_update(self):
|
||||||
"""Fetch new state data for the sensor."""
|
"""Fetch new state data for the sensor."""
|
||||||
await super().async_update()
|
await super().async_update()
|
||||||
if self._speed is not None:
|
if self._speed:
|
||||||
self._state = round(self._speed[0] / 125000, 2)
|
self._state = round(self._speed[0] / 125000, 2)
|
||||||
|
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ class AsuswrtTXSensor(AsuswrtSensor):
|
||||||
async def async_update(self):
|
async def async_update(self):
|
||||||
"""Fetch new state data for the sensor."""
|
"""Fetch new state data for the sensor."""
|
||||||
await super().async_update()
|
await super().async_update()
|
||||||
if self._speed is not None:
|
if self._speed:
|
||||||
self._state = round(self._speed[1] / 125000, 2)
|
self._state = round(self._speed[1] / 125000, 2)
|
||||||
|
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ class AsuswrtTotalRXSensor(AsuswrtSensor):
|
||||||
async def async_update(self):
|
async def async_update(self):
|
||||||
"""Fetch new state data for the sensor."""
|
"""Fetch new state data for the sensor."""
|
||||||
await super().async_update()
|
await super().async_update()
|
||||||
if self._rates is not None:
|
if self._rates:
|
||||||
self._state = round(self._rates[0] / 1000000000, 1)
|
self._state = round(self._rates[0] / 1000000000, 1)
|
||||||
|
|
||||||
|
|
||||||
|
@ -122,5 +122,5 @@ class AsuswrtTotalTXSensor(AsuswrtSensor):
|
||||||
async def async_update(self):
|
async def async_update(self):
|
||||||
"""Fetch new state data for the sensor."""
|
"""Fetch new state data for the sensor."""
|
||||||
await super().async_update()
|
await super().async_update()
|
||||||
if self._rates is not None:
|
if self._rates:
|
||||||
self._state = round(self._rates[1] / 1000000000, 1)
|
self._state = round(self._rates[1] / 1000000000, 1)
|
||||||
|
|
|
@ -86,7 +86,7 @@ abodepy==0.14.0
|
||||||
afsapi==0.0.4
|
afsapi==0.0.4
|
||||||
|
|
||||||
# homeassistant.components.asuswrt
|
# homeassistant.components.asuswrt
|
||||||
aioasuswrt==1.1.11
|
aioasuswrt==1.1.12
|
||||||
|
|
||||||
# homeassistant.components.device_tracker.automatic
|
# homeassistant.components.device_tracker.automatic
|
||||||
aioautomatic==0.6.5
|
aioautomatic==0.6.5
|
||||||
|
|
Loading…
Add table
Reference in a new issue