Migrate attribution attribute for UptimeRobot (#57508)

This commit is contained in:
Franck Nijhof 2021-10-12 05:40:21 +02:00 committed by GitHub
parent 813e27a46a
commit 1a68784852
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,7 +3,6 @@ from __future__ import annotations
from pyuptimerobot import UptimeRobotMonitor
from homeassistant.const import ATTR_ATTRIBUTION
from homeassistant.helpers.entity import EntityDescription
from homeassistant.helpers.update_coordinator import (
CoordinatorEntity,
@ -16,6 +15,8 @@ from .const import ATTR_TARGET, ATTRIBUTION, DOMAIN
class UptimeRobotEntity(CoordinatorEntity):
"""Base UptimeRobot entity."""
_attr_attribution = ATTRIBUTION
def __init__(
self,
coordinator: DataUpdateCoordinator,
@ -34,7 +35,6 @@ class UptimeRobotEntity(CoordinatorEntity):
"model": self.monitor.type.name,
}
self._attr_extra_state_attributes = {
ATTR_ATTRIBUTION: ATTRIBUTION,
ATTR_TARGET: self.monitor.url,
}
self._attr_unique_id = str(self.monitor.id)