mirror of
https://github.com/home-assistant/core
synced 2024-09-03 08:14:07 +02:00
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 <paulus@home-assistant.io> * Update homeassistant/components/twitch/sensor.py Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
This commit is contained in:
parent
ad102b3840
commit
88df9c8ab4
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user