From 1dcba4419932262ff90c1333adef4d614f06d137 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Thu, 14 Oct 2021 10:23:54 +0200 Subject: [PATCH] Migrate attribution attribute for bbox (#57650) --- homeassistant/components/bbox/sensor.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/bbox/sensor.py b/homeassistant/components/bbox/sensor.py index d2c06f45875..d86dd0c243b 100644 --- a/homeassistant/components/bbox/sensor.py +++ b/homeassistant/components/bbox/sensor.py @@ -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."""