Skip to content

Commit

Permalink
Make name unique
Browse files Browse the repository at this point in the history
  • Loading branch information
jbouwh committed May 9, 2024
1 parent 99c047a commit 9f60e9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion homeassistant/components/file/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def __init__(
self._file_path = file_path
self._attr_native_unit_of_measurement = unit_of_measurement
self._val_tpl = value_template
self._attr_unique_id = slugify(f"sensor_{file_path}")
self._attr_unique_id = slugify(f"{name}_{file_path}")

def update(self) -> None:
"""Get the latest entry from a file and updates the state."""
Expand Down

0 comments on commit 9f60e9a

Please sign in to comment.