From de5fd5dcc4164637e4e927f88687e369f3f2d441 Mon Sep 17 00:00:00 2001 From: Aaron Bach Date: Mon, 28 Nov 2022 20:30:59 -0700 Subject: [PATCH] Fix mispelled method --- README.md | 2 +- aiopurpleair/endpoints/sensors.py | 6 +++--- examples/test_api.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b12ac48..9506d3a 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ asyncio.run(main()) - `max_age` (optional): Filter results modified within these seconds. - `modified_since` (optional): Filter results modified since a UTC datetime. - `read_keys` (optional): Read keys for private sensors. -- `sensor_indices` (optional): Filter results by sensor index. +- `sensor_indicies` (optional): Filter results by sensor index. ## Getting a Single Sensor diff --git a/aiopurpleair/endpoints/sensors.py b/aiopurpleair/endpoints/sensors.py index 384e7be..d811076 100644 --- a/aiopurpleair/endpoints/sensors.py +++ b/aiopurpleair/endpoints/sensors.py @@ -59,7 +59,7 @@ async def async_get_sensors( read_keys: list[str] | None = None, se_latitude: float | None = None, se_longitude: float | None = None, - sensor_indices: list[int] | None = None, + sensor_indicies: list[int] | None = None, ) -> GetSensorsResponse: """Get all sensors. @@ -73,7 +73,7 @@ async def async_get_sensors( read_keys: Optional read keys for private sensors. se_latitude: The latitude of the SE corner of an optional bounding box. se_longitude: The longitude of the SE corner of an optional bounding box. - sensor_indices: Filter results by sensor index. + sensor_indicies: Filter results by sensor index. Returns: An API response payload in the form of a Pydantic model. @@ -90,7 +90,7 @@ async def async_get_sensors( ("read_keys", read_keys), ("selat", se_latitude), ("selng", se_longitude), - ("show_only", sensor_indices), + ("show_only", sensor_indicies), ), GetSensorsRequest, GetSensorsResponse, diff --git a/examples/test_api.py b/examples/test_api.py index 2b4e8b6..5c50917 100644 --- a/examples/test_api.py +++ b/examples/test_api.py @@ -22,10 +22,10 @@ async def main() -> None: sensors_response = await api.sensors.async_get_sensors(["name"]) _LOGGER.info(sensors_response) - nearby_sensor_indices = await api.sensors.async_get_nearby_sensors( + nearby_sensor_indicies = await api.sensors.async_get_nearby_sensors( ["name"], 51.5285582, -0.2416796, 10 ) - _LOGGER.info(nearby_sensor_indices) + _LOGGER.info(nearby_sensor_indicies) except PurpleAirError as err: _LOGGER.error("There was an error: %s", err)