Migrate attribution attribute for bitcoin (#57651)

This commit is contained in:
Franck Nijhof 2021-10-14 10:24:30 +02:00 committed by GitHub
parent 1dcba44199
commit f43bba8cfd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,7 +13,6 @@ from homeassistant.components.sensor import (
SensorEntityDescription, SensorEntityDescription,
) )
from homeassistant.const import ( from homeassistant.const import (
ATTR_ATTRIBUTION,
CONF_CURRENCY, CONF_CURRENCY,
CONF_DISPLAY_OPTIONS, CONF_DISPLAY_OPTIONS,
TIME_MINUTES, TIME_MINUTES,
@ -165,7 +164,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
class BitcoinSensor(SensorEntity): class BitcoinSensor(SensorEntity):
"""Representation of a Bitcoin sensor.""" """Representation of a Bitcoin sensor."""
_attr_extra_state_attributes = {ATTR_ATTRIBUTION: ATTRIBUTION} _attr_attribution = ATTRIBUTION
_attr_icon = ICON _attr_icon = ICON
def __init__(self, data, currency, description: SensorEntityDescription): def __init__(self, data, currency, description: SensorEntityDescription):