Add Estimated Database Size to the recorder system health (#71463)

This commit is contained in:
J. Nick Koston 2022-05-07 23:02:54 -05:00 committed by GitHub
parent 49d13b9981
commit a8aa0e1cca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 200 additions and 67 deletions

View file

@ -4,6 +4,7 @@ from functools import partial
import json
from typing import Final
from homeassistant.backports.enum import StrEnum
from homeassistant.const import ATTR_ATTRIBUTION, ATTR_RESTORED, ATTR_SUPPORTED_FEATURES
from homeassistant.helpers.json import JSONEncoder
@ -37,3 +38,11 @@ KEEPALIVE_TIME = 30
EXCLUDE_ATTRIBUTES = f"{DOMAIN}_exclude_attributes_by_domain"
class SupportedDialect(StrEnum):
"""Supported dialects."""
SQLITE = "sqlite"
MYSQL = "mysql"
POSTGRESQL = "postgresql"