Add more info to OpenGarage device info ()

pull/58054/head
Daniel Hjelseth Høyer 2021-10-19 20:08:03 +02:00 committed by GitHub
parent b7db8dd62a
commit 8eef2113c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 4 deletions

View File

@ -2,6 +2,7 @@
from homeassistant.components.opengarage import DOMAIN
from homeassistant.core import callback
from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.update_coordinator import CoordinatorEntity
@ -36,8 +37,12 @@ class OpenGarageEntity(CoordinatorEntity):
def device_info(self):
"""Return the device_info of the device."""
device_info = DeviceInfo(
configuration_url=self.coordinator.open_garage_connection.device_url,
connections={(CONNECTION_NETWORK_MAC, self.coordinator.data["mac"])},
identifiers={(DOMAIN, self._device_id)},
name=self.coordinator.data["name"],
manufacturer="Open Garage",
name=self.coordinator.data["name"],
suggested_area="Garage",
sw_version=self.coordinator.data["fwv"],
)
return device_info

View File

@ -6,7 +6,7 @@
"@danielhiversen"
],
"requirements": [
"open-garage==0.1.5"
"open-garage==0.1.6"
],
"iot_class": "local_polling",
"config_flow": true

View File

@ -1120,7 +1120,7 @@ onkyo-eiscp==1.2.7
onvif-zeep-async==1.2.0
# homeassistant.components.opengarage
open-garage==0.1.5
open-garage==0.1.6
# homeassistant.components.opencv
# opencv-python-headless==4.5.2.54

View File

@ -670,7 +670,7 @@ ondilo==0.2.0
onvif-zeep-async==1.2.0
# homeassistant.components.opengarage
open-garage==0.1.5
open-garage==0.1.6
# homeassistant.components.openerz
openerz-api==0.1.0