Add mixin class CollectionEntity for the collection helper (#77703)

* Add mixin class CollectionEntity for the collection helper

* Improve typing

* Address review comments

* Fix tests
This commit is contained in:
Erik Montnemery 2022-09-03 12:56:49 +02:00 committed by GitHub
parent 56278a4421
commit b0d033ef29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 221 additions and 86 deletions

View file

@ -672,7 +672,7 @@ async def test_restore_idle(hass):
# Emulate a fresh load
hass.data.pop(DATA_RESTORE_STATE_TASK)
entity = Timer(
entity = Timer.from_storage(
{
CONF_ID: "test",
CONF_NAME: "test",
@ -712,7 +712,7 @@ async def test_restore_paused(hass):
# Emulate a fresh load
hass.data.pop(DATA_RESTORE_STATE_TASK)
entity = Timer(
entity = Timer.from_storage(
{
CONF_ID: "test",
CONF_NAME: "test",
@ -756,7 +756,7 @@ async def test_restore_active_resume(hass):
# Emulate a fresh load
hass.data.pop(DATA_RESTORE_STATE_TASK)
entity = Timer(
entity = Timer.from_storage(
{
CONF_ID: "test",
CONF_NAME: "test",
@ -807,7 +807,7 @@ async def test_restore_active_finished_outside_grace(hass):
# Emulate a fresh load
hass.data.pop(DATA_RESTORE_STATE_TASK)
entity = Timer(
entity = Timer.from_storage(
{
CONF_ID: "test",
CONF_NAME: "test",