mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 01:37:08 +00:00
Migrate attribution attribute for UptimeRobot (#57508)
This commit is contained in:
parent
813e27a46a
commit
1a68784852
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user