mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 23:07:09 +00:00
Fix tuya diagnostics mutating cached state objects (#65708)
This commit is contained in:
parent
8574ee04ba
commit
d279211f0c
@ -157,7 +157,7 @@ def _async_device_as_dict(hass: HomeAssistant, device: TuyaDevice) -> dict[str,
|
|||||||
state = hass.states.get(entity_entry.entity_id)
|
state = hass.states.get(entity_entry.entity_id)
|
||||||
state_dict = None
|
state_dict = None
|
||||||
if state:
|
if state:
|
||||||
state_dict = state.as_dict()
|
state_dict = dict(state.as_dict())
|
||||||
|
|
||||||
# Redact the `entity_picture` attribute as it contains a token.
|
# Redact the `entity_picture` attribute as it contains a token.
|
||||||
if "entity_picture" in state_dict["attributes"]:
|
if "entity_picture" in state_dict["attributes"]:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user