mirror of
https://github.com/home-assistant/core.git
synced 2026-10-06 14:29:21 -04:00
import
This commit is contained in:
@@ -7,6 +7,7 @@ from typing import Any, cast, override
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components import websocket_api
|
||||
from homeassistant.config_entries import ConfigFlowResult
|
||||
from homeassistant.const import CONF_ENTITIES, CONF_TYPE
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.exceptions import HomeAssistantError
|
||||
@@ -342,6 +343,17 @@ class GroupConfigFlowHandler(SchemaConfigFlowHandler, domain=DOMAIN):
|
||||
options_flow = OPTIONS_FLOW
|
||||
options_flow_reloads = True
|
||||
|
||||
async def async_step_import(self, import_data: dict[str, Any]) -> ConfigFlowResult:
|
||||
"""Import from a min_max config entry."""
|
||||
print("hej", import_data)
|
||||
"""
|
||||
return self.async_create_entry(
|
||||
title="",
|
||||
data={
|
||||
},
|
||||
)
|
||||
"""
|
||||
|
||||
@callback
|
||||
@override
|
||||
def async_config_entry_title(self, options: Mapping[str, Any]) -> str:
|
||||
|
||||
@@ -33,6 +33,7 @@ from homeassistant.helpers.event import async_track_state_change_event
|
||||
from homeassistant.helpers.issue_registry import IssueSeverity, async_create_issue
|
||||
from homeassistant.helpers.reload import async_setup_reload_service
|
||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType, StateType
|
||||
from homeassistant.util import ulid as ulid_util
|
||||
|
||||
from . import PLATFORMS
|
||||
from .const import CONF_ENTITY_IDS, CONF_ROUND_DIGITS, DOMAIN
|
||||
@@ -92,7 +93,7 @@ async def yaml_deprecation_notice(hass: HomeAssistant, config: ConfigType) -> No
|
||||
async_create_issue(
|
||||
hass,
|
||||
DOMAIN,
|
||||
"yaml_deprecated",
|
||||
ulid_util.ulid(),
|
||||
breaks_in_ha_version="2026.12.0",
|
||||
is_fixable=False,
|
||||
severity=IssueSeverity.WARNING,
|
||||
@@ -117,6 +118,7 @@ async def async_setup_platform(
|
||||
|
||||
await async_setup_reload_service(hass, DOMAIN, PLATFORMS)
|
||||
await yaml_deprecation_notice(hass, config)
|
||||
print("hej", config)
|
||||
|
||||
async_add_entities(
|
||||
[MinMaxSensor(entity_ids, name, sensor_type, round_digits, unique_id)]
|
||||
|
||||
Reference in New Issue
Block a user