mirror of
https://github.com/home-assistant/core.git
synced 2026-02-15 07:36:16 +00:00
Replace the manufacturer name of lunatone (#162854)
This commit is contained in:
@@ -10,7 +10,7 @@ from homeassistant.exceptions import ConfigEntryError
|
|||||||
from homeassistant.helpers import device_registry as dr
|
from homeassistant.helpers import device_registry as dr
|
||||||
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
||||||
|
|
||||||
from .const import DOMAIN
|
from .const import DOMAIN, MANUFACTURER
|
||||||
from .coordinator import (
|
from .coordinator import (
|
||||||
LunatoneConfigEntry,
|
LunatoneConfigEntry,
|
||||||
LunatoneData,
|
LunatoneData,
|
||||||
@@ -40,7 +40,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: LunatoneConfigEntry) ->
|
|||||||
config_entry_id=entry.entry_id,
|
config_entry_id=entry.entry_id,
|
||||||
identifiers={(DOMAIN, str(info_api.serial_number))},
|
identifiers={(DOMAIN, str(info_api.serial_number))},
|
||||||
name=info_api.name,
|
name=info_api.name,
|
||||||
manufacturer="Lunatone",
|
manufacturer=MANUFACTURER,
|
||||||
sw_version=info_api.version,
|
sw_version=info_api.version,
|
||||||
hw_version=coordinator_info.data.device.pcb,
|
hw_version=coordinator_info.data.device.pcb,
|
||||||
configuration_url=entry.data[CONF_URL],
|
configuration_url=entry.data[CONF_URL],
|
||||||
|
|||||||
@@ -3,3 +3,4 @@
|
|||||||
from typing import Final
|
from typing import Final
|
||||||
|
|
||||||
DOMAIN: Final = "lunatone"
|
DOMAIN: Final = "lunatone"
|
||||||
|
MANUFACTURER: Final = "Lunatone Industrielle Elektronik GmbH"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ from unittest.mock import AsyncMock
|
|||||||
|
|
||||||
import aiohttp
|
import aiohttp
|
||||||
|
|
||||||
from homeassistant.components.lunatone.const import DOMAIN
|
from homeassistant.components.lunatone.const import DOMAIN, MANUFACTURER
|
||||||
from homeassistant.config_entries import ConfigEntryState
|
from homeassistant.config_entries import ConfigEntryState
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers import device_registry as dr
|
from homeassistant.helpers import device_registry as dr
|
||||||
@@ -31,7 +31,7 @@ async def test_load_unload_config_entry(
|
|||||||
identifiers={(DOMAIN, mock_config_entry.unique_id)}
|
identifiers={(DOMAIN, mock_config_entry.unique_id)}
|
||||||
)
|
)
|
||||||
assert device_entry is not None
|
assert device_entry is not None
|
||||||
assert device_entry.manufacturer == "Lunatone"
|
assert device_entry.manufacturer == MANUFACTURER
|
||||||
assert device_entry.sw_version == VERSION
|
assert device_entry.sw_version == VERSION
|
||||||
assert device_entry.configuration_url == BASE_URL
|
assert device_entry.configuration_url == BASE_URL
|
||||||
assert device_entry.model == PRODUCT_NAME
|
assert device_entry.model == PRODUCT_NAME
|
||||||
|
|||||||
Reference in New Issue
Block a user