Add last reset to Shelly (#53654)

This commit is contained in:
Paulus Schoutsen 2021-07-28 15:48:27 -07:00 committed by GitHub
parent d40012f110
commit bbd1a85b09
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View file

@ -3,6 +3,7 @@ from __future__ import annotations
import asyncio
from dataclasses import dataclass
from datetime import datetime
import logging
from typing import Any, Callable, Final, cast
@ -179,6 +180,7 @@ class BlockAttributeDescription:
# Callable (settings, block), return true if entity should be removed
removal_condition: Callable[[dict, aioshelly.Block], bool] | None = None
extra_state_attributes: Callable[[aioshelly.Block], dict | None] | None = None
last_reset: datetime | None = None
@dataclass