Add sensor platform to Bring integration (#126642)

* Add sensor platform to Bring integration

* Add more tests

* unignore typedef check

* Update language sensor

* update snapshot

* changes

* add entities

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* add units

* lowercase

* snapshot

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
This commit is contained in:
Manu 2024-09-24 22:55:48 +02:00 committed by GitHub
parent c66e2dc076
commit 20030ab604
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 910 additions and 9 deletions

View file

@ -31,7 +31,7 @@ from .const import (
DOMAIN,
SERVICE_PUSH_NOTIFICATION,
)
from .coordinator import BringData
from .coordinator import BringData, BringDataUpdateCoordinator
from .entity import BringBaseEntity
@ -77,6 +77,13 @@ class BringTodoListEntity(BringBaseEntity, TodoListEntity):
| TodoListEntityFeature.SET_DESCRIPTION_ON_ITEM
)
def __init__(
self, coordinator: BringDataUpdateCoordinator, bring_list: BringData
) -> None:
"""Initialize the entity."""
super().__init__(coordinator, bring_list)
self._attr_unique_id = f"{coordinator.config_entry.unique_id}_{self._list_uuid}"
@property
def todo_items(self) -> list[TodoItem]:
"""Return the todo items."""