Fix configuration url in gogogate2 (#58365)

- I missed that https:// needed to be prepended because the existing
  device already had the url from previous testing
This commit is contained in:
J. Nick Koston 2021-10-24 20:16:15 -10:00 committed by GitHub
parent c950f1ccfa
commit 9885b3de47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -96,8 +96,11 @@ class GoGoGate2Entity(CoordinatorEntity):
def device_info(self) -> DeviceInfo:
"""Device info for the controller."""
data = self.coordinator.data
configuration_url = (
f"https://{data.remoteaccess}" if data.remoteaccess else None
)
return DeviceInfo(
configuration_url=data.remoteaccess if data.remoteaccess else None,
configuration_url=configuration_url,
identifiers={(DOMAIN, str(self._config_entry.unique_id))},
name=self._config_entry.title,
manufacturer=MANUFACTURER,