1
0
mirror of https://github.com/home-assistant/core.git synced 2026-05-30 04:05:01 +01:00

Replace duplicate constants in hegel with homeassistant.const imports (#171974)

This commit is contained in:
Max Michels
2026-05-24 10:43:43 +02:00
committed by GitHub
parent c49ed549db
commit 2f7b3cb7d9
4 changed files with 6 additions and 7 deletions
@@ -9,10 +9,10 @@ import voluptuous as vol
from yarl import URL
from homeassistant.config_entries import ConfigFlow, ConfigFlowResult
from homeassistant.const import CONF_HOST
from homeassistant.const import CONF_HOST, CONF_MODEL
from homeassistant.helpers.service_info.ssdp import SsdpServiceInfo
from .const import CONF_MODEL, DEFAULT_PORT, DOMAIN, MODEL_INPUTS
from .const import DEFAULT_PORT, DOMAIN, MODEL_INPUTS
_LOGGER = logging.getLogger(__name__)
-2
View File
@@ -3,8 +3,6 @@
DOMAIN = "hegel"
DEFAULT_PORT = 50001
# pylint: disable-next=home-assistant-duplicate-const
CONF_MODEL = "model"
CONF_MAX_VOLUME = "max_volume" # 1.0 means amp's internal max
HEARTBEAT_TIMEOUT_MINUTES = 3
@@ -20,6 +20,7 @@ from homeassistant.components.media_player import (
MediaPlayerEntityFeature,
MediaPlayerState,
)
from homeassistant.const import CONF_MODEL
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import HomeAssistantError, ServiceValidationError
from homeassistant.helpers.device_registry import DeviceInfo
@@ -27,7 +28,7 @@ from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.helpers.event import async_track_time_interval
from . import HegelConfigEntry
from .const import CONF_MODEL, DOMAIN, HEARTBEAT_TIMEOUT_MINUTES, MODEL_INPUTS
from .const import DOMAIN, HEARTBEAT_TIMEOUT_MINUTES, MODEL_INPUTS
_LOGGER = logging.getLogger(__name__)
+2 -2
View File
@@ -4,9 +4,9 @@ from unittest.mock import MagicMock
import pytest
from homeassistant.components.hegel.const import CONF_MODEL, DOMAIN
from homeassistant.components.hegel.const import DOMAIN
from homeassistant.config_entries import SOURCE_SSDP, SOURCE_USER
from homeassistant.const import CONF_HOST
from homeassistant.const import CONF_HOST, CONF_MODEL
from homeassistant.core import HomeAssistant
from homeassistant.data_entry_flow import FlowResultType
from homeassistant.helpers.service_info.ssdp import SsdpServiceInfo