Skip to content

Commit

Permalink
Fix issues from ruff check
Browse files Browse the repository at this point in the history
  • Loading branch information
BenBergman committed Mar 1, 2024
1 parent 17435f4 commit 2c8be8d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_components/moonraker/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 2c8be8d

Please sign in to comment.