1
mirror of https://github.com/home-assistant/core synced 2024-10-07 10:13:38 +02:00

Improve asuswrt code readability (#60975)

This commit is contained in:
Chen-IL 2021-12-04 11:29:26 +02:00 committed by GitHub
parent 267896cfc0
commit 8bb1a3fac4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -362,14 +362,14 @@ class AsusWrtRouter:
SENSORS_TYPE_COUNT: SENSORS_CONNECTED_DEVICE,
SENSORS_TYPE_LOAD_AVG: SENSORS_LOAD_AVG,
SENSORS_TYPE_RATES: SENSORS_RATES,
SENSORS_TYPE_TEMPERATURES: SENSORS_TEMPERATURES,
}
sensors_types[
SENSORS_TYPE_TEMPERATURES
] = await self._get_available_temperature_sensors()
for sensor_type, sensor_names in sensors_types.items():
if sensor_type == SENSORS_TYPE_TEMPERATURES:
sensor_names = await self._get_available_temperature_sensors()
if not sensor_names:
continue
if not sensor_names:
continue
coordinator = await self._sensors_data_handler.get_coordinator(
sensor_type, sensor_type != SENSORS_TYPE_COUNT
)