mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Repair elgato types (#49936)
This commit is contained in:
parent
0efd061255
commit
184602e267
@ -15,18 +15,10 @@ from homeassistant.components.light import (
|
|||||||
LightEntity,
|
LightEntity,
|
||||||
)
|
)
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import ATTR_NAME
|
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import DeviceInfo, Entity
|
||||||
|
|
||||||
from .const import (
|
from .const import DATA_ELGATO_CLIENT, DOMAIN
|
||||||
ATTR_IDENTIFIERS,
|
|
||||||
ATTR_MANUFACTURER,
|
|
||||||
ATTR_MODEL,
|
|
||||||
ATTR_SOFTWARE_VERSION,
|
|
||||||
DATA_ELGATO_CLIENT,
|
|
||||||
DOMAIN,
|
|
||||||
)
|
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -143,12 +135,12 @@ class ElgatoLight(LightEntity):
|
|||||||
self._state = None
|
self._state = None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def device_info(self) -> dict[str, Any]:
|
def device_info(self) -> DeviceInfo:
|
||||||
"""Return device information about this Elgato Key Light."""
|
"""Return device information about this Elgato Key Light."""
|
||||||
return {
|
return {
|
||||||
ATTR_IDENTIFIERS: {(DOMAIN, self._info.serial_number)},
|
"identifiers": {(DOMAIN, self._info.serial_number)},
|
||||||
ATTR_NAME: self._info.product_name,
|
"name": self._info.product_name,
|
||||||
ATTR_MANUFACTURER: "Elgato",
|
"manufacturer": "Elgato",
|
||||||
ATTR_MODEL: self._info.product_name,
|
"model": self._info.product_name,
|
||||||
ATTR_SOFTWARE_VERSION: f"{self._info.firmware_version} ({self._info.firmware_build_number})",
|
"sw_version": f"{self._info.firmware_version} ({self._info.firmware_build_number})",
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user