From 88df9c8ab4e2c6a5b20b2cd81ceab64f9a6bb936 Mon Sep 17 00:00:00 2001 From: springstan <46536646+springstan@users.noreply.github.com> Date: Tue, 25 Feb 2020 02:55:31 +0100 Subject: [PATCH] Remove friendly_name attribute from twitch sensor (#32067) * Remove friendly_name attribute twitch sensor * Use deepcopy to only copy the content * Update homeassistant/components/twitch/sensor.py Co-Authored-By: Paulus Schoutsen * Update homeassistant/components/twitch/sensor.py Co-authored-by: Paulus Schoutsen --- homeassistant/components/twitch/sensor.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/twitch/sensor.py b/homeassistant/components/twitch/sensor.py index 1bf66810e5b0..68b7d5dce216 100644 --- a/homeassistant/components/twitch/sensor.py +++ b/homeassistant/components/twitch/sensor.py @@ -6,7 +6,7 @@ from twitch import TwitchClient import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA -from homeassistant.const import ATTR_FRIENDLY_NAME, CONF_TOKEN +from homeassistant.const import CONF_TOKEN import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity import Entity @@ -96,10 +96,7 @@ class TwitchSensor(Entity): @property def device_state_attributes(self): """Return the state attributes.""" - attr = { - ATTR_FRIENDLY_NAME: self._channel.display_name, - } - attr.update(self._statistics) + attr = dict(self._statistics) if self._oauth_enabled: attr.update(self._subscription)