Change unique_id formula for Notion entities (#25076)
* Change unique_id formula for Notion entities * Don't use name
This commit is contained in:
parent
177f5a35ae
commit
51a40c0441
1 changed files with 2 additions and 1 deletions
|
@ -267,7 +267,8 @@ class NotionEntity(Entity):
|
||||||
@property
|
@property
|
||||||
def unique_id(self):
|
def unique_id(self):
|
||||||
"""Return a unique, unchanging string that represents this sensor."""
|
"""Return a unique, unchanging string that represents this sensor."""
|
||||||
return self._task_id
|
task = self._notion.tasks[self._task_id]
|
||||||
|
return '{0}_{1}'.format(self._sensor_id, task['task_type'])
|
||||||
|
|
||||||
async def _update_bridge_id(self):
|
async def _update_bridge_id(self):
|
||||||
"""Update the entity's bridge ID if it has changed.
|
"""Update the entity's bridge ID if it has changed.
|
||||||
|
|
Loading…
Add table
Reference in a new issue