mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Migrate attribution attribute for bbox (#57650)
This commit is contained in:
parent
debcdc382f
commit
1dcba44199
@ -14,7 +14,6 @@ from homeassistant.components.sensor import (
|
||||
SensorEntityDescription,
|
||||
)
|
||||
from homeassistant.const import (
|
||||
ATTR_ATTRIBUTION,
|
||||
CONF_MONITORED_VARIABLES,
|
||||
CONF_NAME,
|
||||
DATA_RATE_MEGABITS_PER_SECOND,
|
||||
@ -117,7 +116,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
class BboxUptimeSensor(SensorEntity):
|
||||
"""Bbox uptime sensor."""
|
||||
|
||||
_attr_extra_state_attributes = {ATTR_ATTRIBUTION: ATTRIBUTION}
|
||||
_attr_attribution = ATTRIBUTION
|
||||
_attr_device_class = DEVICE_CLASS_TIMESTAMP
|
||||
|
||||
def __init__(self, bbox_data, name, description: SensorEntityDescription):
|
||||
@ -138,7 +137,7 @@ class BboxUptimeSensor(SensorEntity):
|
||||
class BboxSensor(SensorEntity):
|
||||
"""Implementation of a Bbox sensor."""
|
||||
|
||||
_attr_extra_state_attributes = {ATTR_ATTRIBUTION: ATTRIBUTION}
|
||||
_attr_attribution = ATTRIBUTION
|
||||
|
||||
def __init__(self, bbox_data, name, description: SensorEntityDescription):
|
||||
"""Initialize the sensor."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user