Move attribution to standalone attribute [h-l] (#80516)
This commit is contained in:
parent
9ff077e225
commit
5d207f77ae
10 changed files with 27 additions and 34 deletions
|
@ -16,7 +16,7 @@ from pyicloud.services.findmyiphone import AppleDevice
|
|||
|
||||
from homeassistant.components.zone import async_active_zone
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import ATTR_ATTRIBUTION, CONF_USERNAME
|
||||
from homeassistant.const import CONF_USERNAME
|
||||
from homeassistant.core import CALLBACK_TYPE, HomeAssistant
|
||||
from homeassistant.exceptions import ConfigEntryNotReady
|
||||
from homeassistant.helpers.dispatcher import dispatcher_send
|
||||
|
@ -48,8 +48,6 @@ from .const import (
|
|||
DOMAIN,
|
||||
)
|
||||
|
||||
ATTRIBUTION = "Data provided by Apple iCloud"
|
||||
|
||||
# entity attributes
|
||||
ATTR_ACCOUNT_FETCH_INTERVAL = "account_fetch_interval"
|
||||
ATTR_BATTERY = "battery"
|
||||
|
@ -368,6 +366,8 @@ class IcloudAccount:
|
|||
class IcloudDevice:
|
||||
"""Representation of a iCloud device."""
|
||||
|
||||
_attr_attribution = "Data provided by Apple iCloud"
|
||||
|
||||
def __init__(self, account: IcloudAccount, device: AppleDevice, status) -> None:
|
||||
"""Initialize the iCloud device."""
|
||||
self._account = account
|
||||
|
@ -385,7 +385,6 @@ class IcloudDevice:
|
|||
self._location = None
|
||||
|
||||
self._attrs = {
|
||||
ATTR_ATTRIBUTION: ATTRIBUTION,
|
||||
ATTR_ACCOUNT_FETCH_INTERVAL: self._account.fetch_interval,
|
||||
ATTR_DEVICE_NAME: self._device_model,
|
||||
ATTR_DEVICE_STATUS: None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue