From ed25f501b421015fbef49a89b89f3ca406798e4f Mon Sep 17 00:00:00 2001 From: Benjamin Bergman Date: Thu, 29 Feb 2024 21:46:33 -0600 Subject: [PATCH] Fix issues from ruff check --- custom_components/moonraker/sensor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/custom_components/moonraker/sensor.py b/custom_components/moonraker/sensor.py index c4f8189..cda7286 100755 --- a/custom_components/moonraker/sensor.py +++ b/custom_components/moonraker/sensor.py @@ -388,7 +388,7 @@ async def async_setup_optional_sensors(coordinator, entry, async_add_entities): METHODS.PRINTER_OBJECTS_QUERY, query_obj, quiet=True ) - if "pressure" in result["status"][obj].keys(): + if "pressure" in result["status"][obj]: desc = MoonrakerSensorDescription( key=f"{split_obj[0]}_{split_obj[1]}_pressure", status_key=obj, @@ -403,7 +403,7 @@ async def async_setup_optional_sensors(coordinator, entry, async_add_entities): ) sensors.append(desc) - if "humidity" in result["status"][obj].keys(): + if "humidity" in result["status"][obj]: desc = MoonrakerSensorDescription( key=f"{split_obj[0]}_{split_obj[1]}_humidity", status_key=obj, @@ -418,7 +418,7 @@ async def async_setup_optional_sensors(coordinator, entry, async_add_entities): ) sensors.append(desc) - if "gas" in result["status"][obj].keys(): + if "gas" in result["status"][obj]: desc = MoonrakerSensorDescription( key=f"{split_obj[0]}_{split_obj[1]}_gas", status_key=obj,