diff --git a/homeassistant/components/wiffi/__init__.py b/homeassistant/components/wiffi/__init__.py index 5f87141e423..05b86c209a6 100644 --- a/homeassistant/components/wiffi/__init__.py +++ b/homeassistant/components/wiffi/__init__.py @@ -14,7 +14,7 @@ from homeassistant.helpers.dispatcher import ( async_dispatcher_connect, async_dispatcher_send, ) -from homeassistant.helpers.entity import Entity +from homeassistant.helpers.entity import DeviceInfo, Entity from homeassistant.helpers.event import async_track_time_interval from homeassistant.util.dt import utcnow @@ -141,16 +141,14 @@ class WiffiEntity(Entity): def __init__(self, device, metric, options): """Initialize the base elements of a wiffi entity.""" self._id = generate_unique_id(device, metric) - self._device_info = { - "connections": { - (device_registry.CONNECTION_NETWORK_MAC, device.mac_address) - }, - "identifiers": {(DOMAIN, device.mac_address)}, - "manufacturer": "stall.biz", - "name": f"{device.moduletype} {device.mac_address}", - "model": device.moduletype, - "sw_version": device.sw_version, - } + self._device_info = DeviceInfo( + connections={(device_registry.CONNECTION_NETWORK_MAC, device.mac_address)}, + identifiers={(DOMAIN, device.mac_address)}, + manufacturer="stall.biz", + model=device.moduletype, + name=f"{device.moduletype} {device.mac_address}", + sw_version=device.sw_version, + ) self._name = metric.description self._expiration_date = None self._value = None