mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Apply late review comments on media player (#106727)
This commit is contained in:
parent
77cdc10883
commit
5eb1073b4a
@ -27,7 +27,7 @@ SIGNIFICANT_ATTRIBUTES: set[str] = {
|
|||||||
ATTR_ENTITY_PICTURE_LOCAL,
|
ATTR_ENTITY_PICTURE_LOCAL,
|
||||||
ATTR_GROUP_MEMBERS,
|
ATTR_GROUP_MEMBERS,
|
||||||
*ATTR_TO_PROPERTY,
|
*ATTR_TO_PROPERTY,
|
||||||
}
|
} - INSIGNIFICANT_ATTRIBUTES
|
||||||
|
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
@ -44,18 +44,10 @@ def async_check_significant_change(
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
old_attrs_s = set(
|
old_attrs_s = set(
|
||||||
{
|
{k: v for k, v in old_attrs.items() if k in SIGNIFICANT_ATTRIBUTES}.items()
|
||||||
k: v
|
|
||||||
for k, v in old_attrs.items()
|
|
||||||
if k in SIGNIFICANT_ATTRIBUTES - INSIGNIFICANT_ATTRIBUTES
|
|
||||||
}.items()
|
|
||||||
)
|
)
|
||||||
new_attrs_s = set(
|
new_attrs_s = set(
|
||||||
{
|
{k: v for k, v in new_attrs.items() if k in SIGNIFICANT_ATTRIBUTES}.items()
|
||||||
k: v
|
|
||||||
for k, v in new_attrs.items()
|
|
||||||
if k in SIGNIFICANT_ATTRIBUTES - INSIGNIFICANT_ATTRIBUTES
|
|
||||||
}.items()
|
|
||||||
)
|
)
|
||||||
changed_attrs: set[str] = {item[0] for item in old_attrs_s ^ new_attrs_s}
|
changed_attrs: set[str] = {item[0] for item in old_attrs_s ^ new_attrs_s}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user