Add restored to the set of attributes excluded from being recorded in the db (#70169)

* Add restored to the set of attributes excluded from being recorded in the database

- Noticed on restart that the table gets 100s of new rows because
  of these

* Update homeassistant/components/recorder/const.py
This commit is contained in:
J. Nick Koston 2022-04-16 11:09:08 -10:00 committed by GitHub
parent 3bcd921a28
commit 37d39ac6d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,7 @@ from functools import partial
import json
from typing import Final
from homeassistant.const import ATTR_ATTRIBUTION, ATTR_SUPPORTED_FEATURES
from homeassistant.const import ATTR_ATTRIBUTION, ATTR_RESTORED, ATTR_SUPPORTED_FEATURES
from homeassistant.helpers.json import JSONEncoder
DATA_INSTANCE = "recorder_instance"
@ -27,4 +27,4 @@ DB_WORKER_PREFIX = "DbWorker"
JSON_DUMP: Final = partial(json.dumps, cls=JSONEncoder, separators=(",", ":"))
ALL_DOMAIN_EXCLUDE_ATTRS = {ATTR_ATTRIBUTION, ATTR_SUPPORTED_FEATURES}
ALL_DOMAIN_EXCLUDE_ATTRS = {ATTR_ATTRIBUTION, ATTR_RESTORED, ATTR_SUPPORTED_FEATURES}