From 0fd88e7e666ddbd31fbd0aaea15eb0dff35cc129 Mon Sep 17 00:00:00 2001 From: Aaron Bach Date: Tue, 20 Jul 2021 15:41:03 -0600 Subject: [PATCH] Type _attr_extra_state_attributes as a MutableMapping (#52616) * Type extra_state_attributes as a MutableMapping * Update homeassistant/helpers/entity.py Co-authored-by: Ruslan Sayfutdinov * Update homeassistant/helpers/entity.py Co-authored-by: Ruslan Sayfutdinov --- homeassistant/helpers/entity.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/helpers/entity.py b/homeassistant/helpers/entity.py index 187d53ea00b..a50afd410e9 100644 --- a/homeassistant/helpers/entity.py +++ b/homeassistant/helpers/entity.py @@ -3,7 +3,7 @@ from __future__ import annotations from abc import ABC import asyncio -from collections.abc import Awaitable, Iterable, Mapping +from collections.abc import Awaitable, Iterable, Mapping, MutableMapping from datetime import datetime, timedelta import functools as ft import logging @@ -227,7 +227,7 @@ class Entity(ABC): _attr_device_info: DeviceInfo | None = None _attr_entity_picture: str | None = None _attr_entity_registry_enabled_default: bool = True - _attr_extra_state_attributes: Mapping[str, Any] | None = None + _attr_extra_state_attributes: MutableMapping[str, Any] | None = None _attr_force_update: bool = False _attr_icon: str | None = None _attr_name: str | None = None