From 2c8be8da97ffd7c73467536d02da00370602fe8e 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 311971e..5958721 100755 --- a/custom_components/moonraker/sensor.py +++ b/custom_components/moonraker/sensor.py @@ -387,7 +387,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, @@ -402,7 +402,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, @@ -417,7 +417,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,