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 authored and marcolivierarsenault committed Mar 22, 2024
1 parent 13ca553 commit ed25f50
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 @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit ed25f50

Please sign in to comment.