Skip to content

Commit

Permalink
added domain prefix to entities
Browse files Browse the repository at this point in the history
  • Loading branch information
toggm committed Nov 22, 2024
1 parent 44696d4 commit 9a510e9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion custom_components/askoheat/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ async def async_step_user(
f"sensor.{SensorAttrKey.PAR_ARTICLE_NUMBER}"
]
serial_number = parameters[f"sensor.{SensorAttrKey.PAR_ID}"]
unique_id = serial_number.lower().replace("-", "_").replace(".", "_")
cleaned_serial_number = (
serial_number.lower().replace("-", "_").replace(".", "_")
)
unique_id = f"{DOMAIN}_{cleaned_serial_number}"

await self.async_set_unique_id(unique_id)
self._abort_if_unique_id_configured()
Expand Down

0 comments on commit 9a510e9

Please sign in to comment.