mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Use DeviceInfo in songpal (#58574)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
d579d90f10
commit
e99bef7b6e
@ -32,6 +32,7 @@ from homeassistant.helpers import (
|
|||||||
device_registry as dr,
|
device_registry as dr,
|
||||||
entity_platform,
|
entity_platform,
|
||||||
)
|
)
|
||||||
|
from homeassistant.helpers.entity import DeviceInfo
|
||||||
|
|
||||||
from .const import CONF_ENDPOINT, DOMAIN, SET_SOUND_SETTING
|
from .const import CONF_ENDPOINT, DOMAIN, SET_SOUND_SETTING
|
||||||
|
|
||||||
@ -205,16 +206,16 @@ class SongpalEntity(MediaPlayerEntity):
|
|||||||
return self._sysinfo.macAddr
|
return self._sysinfo.macAddr
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def device_info(self):
|
def device_info(self) -> DeviceInfo:
|
||||||
"""Return the device info."""
|
"""Return the device info."""
|
||||||
return {
|
return DeviceInfo(
|
||||||
"connections": {(dr.CONNECTION_NETWORK_MAC, self._sysinfo.macAddr)},
|
connections={(dr.CONNECTION_NETWORK_MAC, self._sysinfo.macAddr)},
|
||||||
"identifiers": {(DOMAIN, self.unique_id)},
|
identifiers={(DOMAIN, self.unique_id)},
|
||||||
"manufacturer": "Sony Corporation",
|
manufacturer="Sony Corporation",
|
||||||
"name": self.name,
|
model=self._model,
|
||||||
"sw_version": self._sysinfo.version,
|
name=self.name,
|
||||||
"model": self._model,
|
sw_version=self._sysinfo.version,
|
||||||
}
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def available(self):
|
def available(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user