Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions homeassistant/components/vizio/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
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

Expand Down Expand Up @@ -194,13 +195,13 @@ async def async_update(self) -> None:
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
Expand Down