Add configuration_url to integration (#60565)

This commit is contained in:
Klaas Schoute 2021-11-30 08:32:02 +01:00 committed by GitHub
parent bb92dd2467
commit 222da7e2d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,6 +12,7 @@ from homeassistant.components.sensor import (
) )
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.const import ( from homeassistant.const import (
CONF_HOST,
CURRENCY_EURO, CURRENCY_EURO,
DEVICE_CLASS_CURRENT, DEVICE_CLASS_CURRENT,
DEVICE_CLASS_ENERGY, DEVICE_CLASS_ENERGY,
@ -268,6 +269,7 @@ class P1MonitorSensorEntity(CoordinatorEntity, SensorEntity):
identifiers={ identifiers={
(DOMAIN, f"{coordinator.config_entry.entry_id}_{service_key}") (DOMAIN, f"{coordinator.config_entry.entry_id}_{service_key}")
}, },
configuration_url=f"http://{coordinator.config_entry.data[CONF_HOST]}",
manufacturer="P1 Monitor", manufacturer="P1 Monitor",
name=service, name=service,
) )