Use DeviceInfo in vizio (#58617)
Co-authored-by: epenet <epenet@users.noreply.github.com>pull/58628/head
parent
7e9a67194a
commit
7d235cb9bb
|
@ -33,6 +33,7 @@ from homeassistant.helpers.dispatcher import (
|
|||
async_dispatcher_connect,
|
||||
async_dispatcher_send,
|
||||
)
|
||||
from homeassistant.helpers.entity import DeviceInfo
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
|
||||
|
||||
|
@ -194,13 +195,13 @@ class VizioDevice(MediaPlayerEntity):
|
|||
self._attr_available = True
|
||||
|
||||
if not self._attr_device_info:
|
||||
self._attr_device_info = {
|
||||
"identifiers": {(DOMAIN, self._attr_unique_id)},
|
||||
"name": self._attr_name,
|
||||
"manufacturer": "VIZIO",
|
||||
"model": await self._device.get_model_name(log_api_exception=False),
|
||||
"sw_version": await self._device.get_version(log_api_exception=False),
|
||||
}
|
||||
self._attr_device_info = DeviceInfo(
|
||||
identifiers={(DOMAIN, self._attr_unique_id)},
|
||||
manufacturer="VIZIO",
|
||||
model=await self._device.get_model_name(log_api_exception=False),
|
||||
name=self._attr_name,
|
||||
sw_version=await self._device.get_version(log_api_exception=False),
|
||||
)
|
||||
|
||||
if not is_on:
|
||||
self._attr_state = STATE_OFF
|
||||
|
|
Loading…
Reference in New Issue