Increase Netgear speedtest period to 2 hours (#85299)

This commit is contained in:
starkillerOG 2023-01-06 12:56:27 +01:00 committed by GitHub
parent b9339a290a
commit d9be9fe6d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -29,8 +29,8 @@ from .router import NetgearRouter
_LOGGER = logging.getLogger(__name__)
SCAN_INTERVAL = timedelta(seconds=30)
SPEED_TEST_INTERVAL = timedelta(seconds=1800)
SCAN_INTERVAL_FIRMWARE = timedelta(seconds=18000)
SPEED_TEST_INTERVAL = timedelta(hours=2)
SCAN_INTERVAL_FIRMWARE = timedelta(hours=5)
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:

View File

@ -431,6 +431,8 @@ class NetgearRouterSensorEntity(NetgearRouterCoordinatorEntity, RestoreSensor):
sensor_data = await self.async_get_last_sensor_data()
if sensor_data is not None:
self._value = sensor_data.native_value
else:
self.schedule_update_ha_state()
@callback
def async_update_device(self) -> None: