Skip to content
Snippets Groups Projects
Unverified Commit 147bbb30 authored by epenet's avatar epenet Committed by GitHub
Browse files

Use DeviceInfo in zerproc (#58647)

parent 991c4153
No related branches found
No related tags found
No related merge requests found
...@@ -16,6 +16,7 @@ from homeassistant.components.light import ( ...@@ -16,6 +16,7 @@ from homeassistant.components.light import (
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.const import EVENT_HOMEASSISTANT_STOP from homeassistant.const import EVENT_HOMEASSISTANT_STOP
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.event import async_track_time_interval from homeassistant.helpers.event import async_track_time_interval
import homeassistant.util.color as color_util import homeassistant.util.color as color_util
...@@ -117,13 +118,13 @@ class ZerprocLight(LightEntity): ...@@ -117,13 +118,13 @@ class ZerprocLight(LightEntity):
return self._light.address return self._light.address
@property @property
def device_info(self): def device_info(self) -> DeviceInfo:
"""Device info for this light.""" """Device info for this light."""
return { return DeviceInfo(
"identifiers": {(DOMAIN, self.unique_id)}, identifiers={(DOMAIN, self.unique_id)},
"name": self.name, manufacturer="Zerproc",
"manufacturer": "Zerproc", name=self.name,
} )
@property @property
def icon(self) -> str | None: def icon(self) -> str | None:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment