Use DeviceInfo Class N-O (#58314)
This commit is contained in:
parent
0c94fcecf6
commit
2df13d0118
23 changed files with 155 additions and 162 deletions
|
@ -25,7 +25,7 @@ from homeassistant.const import (
|
|||
)
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||
from homeassistant.helpers.entity import async_generate_entity_id
|
||||
from homeassistant.helpers.entity import DeviceInfo, async_generate_entity_id
|
||||
|
||||
from . import DOMAIN
|
||||
from .const import (
|
||||
|
@ -171,15 +171,15 @@ class OpenThermClimate(ClimateEntity):
|
|||
return self.friendly_name
|
||||
|
||||
@property
|
||||
def device_info(self):
|
||||
def device_info(self) -> DeviceInfo:
|
||||
"""Return device info."""
|
||||
return {
|
||||
"identifiers": {(DOMAIN, self._gateway.gw_id)},
|
||||
"name": self._gateway.name,
|
||||
"manufacturer": "Schelte Bron",
|
||||
"model": "OpenTherm Gateway",
|
||||
"sw_version": self._gateway.gw_version,
|
||||
}
|
||||
return DeviceInfo(
|
||||
identifiers={(DOMAIN, self._gateway.gw_id)},
|
||||
manufacturer="Schelte Bron",
|
||||
model="OpenTherm Gateway",
|
||||
name=self._gateway.name,
|
||||
sw_version=self._gateway.gw_version,
|
||||
)
|
||||
|
||||
@property
|
||||
def unique_id(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue