Remove attributes from Twinkly lights (#84986)
This commit is contained in:
parent
f999258a42
commit
02b5da710b
3 changed files with 0 additions and 14 deletions
|
@ -23,11 +23,5 @@ DEV_PROFILE_RGBW = "RGBW"
|
||||||
DATA_CLIENT = "client"
|
DATA_CLIENT = "client"
|
||||||
DATA_DEVICE_INFO = "device_info"
|
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
|
# Minimum version required to support effects
|
||||||
MIN_EFFECT_VERSION = "2.7.1"
|
MIN_EFFECT_VERSION = "2.7.1"
|
||||||
|
|
|
@ -38,7 +38,6 @@ from .const import (
|
||||||
DEV_PROFILE_RGB,
|
DEV_PROFILE_RGB,
|
||||||
DEV_PROFILE_RGBW,
|
DEV_PROFILE_RGBW,
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
HIDDEN_DEV_VALUES,
|
|
||||||
MIN_EFFECT_VERSION,
|
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:
|
if LightEntityFeature.EFFECT & self.supported_features:
|
||||||
await self.async_update_movies()
|
await self.async_update_movies()
|
||||||
await self.async_update_current_movie()
|
await self.async_update_current_movie()
|
||||||
|
|
|
@ -34,9 +34,6 @@ async def test_initial_state(hass: HomeAssistant):
|
||||||
assert state.attributes["friendly_name"] == entity.unique_id
|
assert state.attributes["friendly_name"] == entity.unique_id
|
||||||
assert state.attributes["icon"] == "mdi:string-lights"
|
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_name == entity.unique_id
|
||||||
assert entity.original_icon == "mdi:string-lights"
|
assert entity.original_icon == "mdi:string-lights"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue