Skip to content

Commit

Permalink
Remove existing 'temp' suffix so we avoid duplicates on temp sensors …
Browse files Browse the repository at this point in the history
…with it automatically added to their name
  • Loading branch information
BenBergman authored and marcolivierarsenault committed Mar 22, 2024
1 parent ed25f50 commit 5448af7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/moonraker/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ async def async_setup_optional_sensors(coordinator, entry, async_add_entities):
desc = MoonrakerSensorDescription(
key=f"{split_obj[0]}_{split_obj[1]}",
status_key=obj,
name=split_obj[1].replace("_", " ").title() + " Temperature",
name=split_obj[1].removesuffix("_temp").replace("_", " ").title() + " Temp",
value_fn=lambda sensor: sensor.coordinator.data["status"][
sensor.status_key
]["temperature"],
Expand Down

0 comments on commit 5448af7

Please sign in to comment.