mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 22:07:10 +00:00
Migrate attribution attribute for bitcoin (#57651)
This commit is contained in:
parent
1dcba44199
commit
f43bba8cfd
@ -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):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user