mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Use DeviceInfo in volumio (#58619)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
8ed4e500d3
commit
1c7fbb7540
@ -31,6 +31,7 @@ from homeassistant.const import (
|
|||||||
STATE_PAUSED,
|
STATE_PAUSED,
|
||||||
STATE_PLAYING,
|
STATE_PLAYING,
|
||||||
)
|
)
|
||||||
|
from homeassistant.helpers.entity import DeviceInfo
|
||||||
from homeassistant.util import Throttle
|
from homeassistant.util import Throttle
|
||||||
|
|
||||||
from .browse_media import browse_node, browse_top_level
|
from .browse_media import browse_node, browse_top_level
|
||||||
@ -99,15 +100,15 @@ class Volumio(MediaPlayerEntity):
|
|||||||
return self._name
|
return self._name
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def device_info(self):
|
def device_info(self) -> DeviceInfo:
|
||||||
"""Return device info for this device."""
|
"""Return device info for this device."""
|
||||||
return {
|
return DeviceInfo(
|
||||||
"identifiers": {(DOMAIN, self.unique_id)},
|
identifiers={(DOMAIN, self.unique_id)},
|
||||||
"name": self.name,
|
manufacturer="Volumio",
|
||||||
"manufacturer": "Volumio",
|
model=self._info["hardware"],
|
||||||
"sw_version": self._info["systemversion"],
|
name=self.name,
|
||||||
"model": self._info["hardware"],
|
sw_version=self._info["systemversion"],
|
||||||
}
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def media_content_type(self):
|
def media_content_type(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user