Revert "Allows defining list of attributes excluded from history in manifest.json" (#99300)

Revert "Allows defining list of attributes excluded from history in manifest.json (#99283)"

This reverts commit 0366e14630.
This commit is contained in:
Erik Montnemery 2023-08-30 08:26:26 +02:00 committed by GitHub
parent fb4e93071e
commit 7e7cb15d5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 21 additions and 72 deletions

View file

@ -57,6 +57,9 @@ from homeassistant.helpers import condition
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import ToggleEntity
from homeassistant.helpers.entity_component import EntityComponent
from homeassistant.helpers.integration_platform import (
async_process_integration_platform_for_component,
)
from homeassistant.helpers.issue_registry import IssueSeverity, async_create_issue
from homeassistant.helpers.restore_state import RestoreEntity
from homeassistant.helpers.script import (
@ -246,6 +249,10 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
LOGGER, DOMAIN, hass
)
# Process integration platforms right away since
# we will create entities before firing EVENT_COMPONENT_LOADED
await async_process_integration_platform_for_component(hass, DOMAIN)
# Register automation as valid domain for Blueprint
async_get_blueprints(hass)

View file

@ -6,12 +6,5 @@
"dependencies": ["blueprint", "trace"],
"documentation": "https://www.home-assistant.io/integrations/automation",
"integration_type": "system",
"quality_scale": "internal",
"recorder_excluded_attributes": [
"current",
"id",
"last_triggered",
"max",
"mode"
]
"quality_scale": "internal"
}

View file

@ -0,0 +1,12 @@
"""Integration platform for recorder."""
from __future__ import annotations
from homeassistant.core import HomeAssistant, callback
from . import ATTR_CUR, ATTR_LAST_TRIGGERED, ATTR_MAX, ATTR_MODE, CONF_ID
@callback
def exclude_attributes(hass: HomeAssistant) -> set[str]:
"""Exclude extra attributes from being recorded in the database."""
return {ATTR_LAST_TRIGGERED, ATTR_MODE, ATTR_CUR, ATTR_MAX, CONF_ID}