From 02b5da710bc5324619e1c22af7c33e8cd8d6958d Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Mon, 2 Jan 2023 17:58:07 +0100 Subject: [PATCH] Remove attributes from Twinkly lights (#84986) --- homeassistant/components/twinkly/const.py | 6 ------ homeassistant/components/twinkly/light.py | 5 ----- tests/components/twinkly/test_light.py | 3 --- 3 files changed, 14 deletions(-) diff --git a/homeassistant/components/twinkly/const.py b/homeassistant/components/twinkly/const.py index d0d905a5752..2158e4aae07 100644 --- a/homeassistant/components/twinkly/const.py +++ b/homeassistant/components/twinkly/const.py @@ -23,11 +23,5 @@ DEV_PROFILE_RGBW = "RGBW" DATA_CLIENT = "client" DATA_DEVICE_INFO = "device_info" -HIDDEN_DEV_VALUES = ( - "code", # This is the internal status code of the API response - "copyright", # We should not display a copyright "LEDWORKS 2018" in the Home-Assistant UI - "mac", # Does not report the actual device mac address -) - # Minimum version required to support effects MIN_EFFECT_VERSION = "2.7.1" diff --git a/homeassistant/components/twinkly/light.py b/homeassistant/components/twinkly/light.py index 3174f60edf8..0145439493b 100644 --- a/homeassistant/components/twinkly/light.py +++ b/homeassistant/components/twinkly/light.py @@ -38,7 +38,6 @@ from .const import ( DEV_PROFILE_RGB, DEV_PROFILE_RGBW, DOMAIN, - HIDDEN_DEV_VALUES, MIN_EFFECT_VERSION, ) @@ -297,10 +296,6 @@ class TwinklyLight(LightEntity): }, ) - for key, value in device_info.items(): - if key not in HIDDEN_DEV_VALUES: - self._attributes[key] = value - if LightEntityFeature.EFFECT & self.supported_features: await self.async_update_movies() await self.async_update_current_movie() diff --git a/tests/components/twinkly/test_light.py b/tests/components/twinkly/test_light.py index 53e589c564b..d5da88cda11 100644 --- a/tests/components/twinkly/test_light.py +++ b/tests/components/twinkly/test_light.py @@ -34,9 +34,6 @@ async def test_initial_state(hass: HomeAssistant): assert state.attributes["friendly_name"] == entity.unique_id assert state.attributes["icon"] == "mdi:string-lights" - # Validates that custom properties of the API device_info are propagated through attributes - assert state.attributes["uuid"] == entity.unique_id - assert entity.original_name == entity.unique_id assert entity.original_icon == "mdi:string-lights"