Remove attributes from Twinkly lights (#84986)

This commit is contained in:
Franck Nijhof 2023-01-02 17:58:07 +01:00 committed by GitHub
parent f999258a42
commit 02b5da710b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 14 deletions

View file

@ -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"

View file

@ -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()

View file

@ -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"