mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Use DeviceInfo in twentemilieu (#58608)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
2dcb429c95
commit
d065ddc5c1
@ -12,13 +12,7 @@ from twentemilieu import (
|
|||||||
|
|
||||||
from homeassistant.components.sensor import SensorEntity
|
from homeassistant.components.sensor import SensorEntity
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import (
|
from homeassistant.const import CONF_ID, DEVICE_CLASS_DATE
|
||||||
ATTR_IDENTIFIERS,
|
|
||||||
ATTR_MANUFACTURER,
|
|
||||||
ATTR_NAME,
|
|
||||||
CONF_ID,
|
|
||||||
DEVICE_CLASS_DATE,
|
|
||||||
)
|
|
||||||
from homeassistant.core import HomeAssistant, callback
|
from homeassistant.core import HomeAssistant, callback
|
||||||
from homeassistant.exceptions import PlatformNotReady
|
from homeassistant.exceptions import PlatformNotReady
|
||||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||||
@ -153,8 +147,8 @@ class TwenteMilieuSensor(SensorEntity):
|
|||||||
@property
|
@property
|
||||||
def device_info(self) -> DeviceInfo:
|
def device_info(self) -> DeviceInfo:
|
||||||
"""Return device information about Twente Milieu."""
|
"""Return device information about Twente Milieu."""
|
||||||
return {
|
return DeviceInfo(
|
||||||
ATTR_IDENTIFIERS: {(DOMAIN, self._unique_id)},
|
identifiers={(DOMAIN, self._unique_id)},
|
||||||
ATTR_NAME: "Twente Milieu",
|
manufacturer="Twente Milieu",
|
||||||
ATTR_MANUFACTURER: "Twente Milieu",
|
name="Twente Milieu",
|
||||||
}
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user