mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 10:59:40 +00:00
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:
@@ -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)
|
||||
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
12
homeassistant/components/automation/recorder.py
Normal file
12
homeassistant/components/automation/recorder.py
Normal 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}
|
||||
Reference in New Issue
Block a user