mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
Add configuration_url to gogogate2 (#57739)
This commit is contained in:
parent
148d2480ac
commit
e7ac734d01
@ -18,6 +18,7 @@ from homeassistant.const import (
|
|||||||
)
|
)
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers.debounce import Debouncer
|
from homeassistant.helpers.debounce import Debouncer
|
||||||
|
from homeassistant.helpers.entity import DeviceInfo
|
||||||
from homeassistant.helpers.httpx_client import get_async_client
|
from homeassistant.helpers.httpx_client import get_async_client
|
||||||
from homeassistant.helpers.update_coordinator import (
|
from homeassistant.helpers.update_coordinator import (
|
||||||
CoordinatorEntity,
|
CoordinatorEntity,
|
||||||
@ -95,13 +96,18 @@ class GoGoGate2Entity(CoordinatorEntity):
|
|||||||
def device_info(self):
|
def device_info(self):
|
||||||
"""Device info for the controller."""
|
"""Device info for the controller."""
|
||||||
data = self.coordinator.data
|
data = self.coordinator.data
|
||||||
return {
|
info: DeviceInfo = {
|
||||||
"identifiers": {(DOMAIN, self._config_entry.unique_id)},
|
"identifiers": {(DOMAIN, self._config_entry.unique_id)},
|
||||||
"name": self._config_entry.title,
|
"name": self._config_entry.title,
|
||||||
"manufacturer": MANUFACTURER,
|
"manufacturer": MANUFACTURER,
|
||||||
"model": data.model,
|
"model": data.model,
|
||||||
"sw_version": data.firmwareversion,
|
"sw_version": data.firmwareversion,
|
||||||
}
|
}
|
||||||
|
if data.model.startswith("ismartgate"):
|
||||||
|
info[
|
||||||
|
"configuration_url"
|
||||||
|
] = f"https://{self._config_entry.unique_id}.isgaccess.com"
|
||||||
|
return info
|
||||||
|
|
||||||
|
|
||||||
def get_data_update_coordinator(
|
def get_data_update_coordinator(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user