mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Add model ID to linkplay (#125370)
This commit is contained in:
parent
187a38c91f
commit
0092796fd2
@ -28,7 +28,7 @@ from homeassistant.util.dt import utcnow
|
||||
|
||||
from . import LinkPlayConfigEntry
|
||||
from .const import DOMAIN
|
||||
from .utils import get_info_from_project
|
||||
from .utils import MANUFACTURER_GENERIC, get_info_from_project
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
STATE_MAP: dict[PlayingStatus, MediaPlayerState] = {
|
||||
@ -153,6 +153,9 @@ class LinkPlayMediaPlayerEntity(MediaPlayerEntity):
|
||||
]
|
||||
|
||||
manufacturer, model = get_info_from_project(bridge.device.properties["project"])
|
||||
if model != MANUFACTURER_GENERIC:
|
||||
model_id = bridge.device.properties["project"]
|
||||
|
||||
self._attr_device_info = dr.DeviceInfo(
|
||||
configuration_url=bridge.endpoint,
|
||||
connections={(dr.CONNECTION_NETWORK_MAC, bridge.device.properties["MAC"])},
|
||||
@ -160,6 +163,7 @@ class LinkPlayMediaPlayerEntity(MediaPlayerEntity):
|
||||
identifiers={(DOMAIN, bridge.device.uuid)},
|
||||
manufacturer=manufacturer,
|
||||
model=model,
|
||||
model_id=model_id,
|
||||
name=bridge.device.name,
|
||||
sw_version=bridge.device.properties["firmware"],
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user