diff --git a/homeassistant/components/isy994/entity.py b/homeassistant/components/isy994/entity.py index 893b33644fe..1da727fdee8 100644 --- a/homeassistant/components/isy994/entity.py +++ b/homeassistant/components/isy994/entity.py @@ -106,7 +106,7 @@ class ISYNodeEntity(ISYEntity): return getattr(self._node, TAG_ENABLED, True) @property - def extra_state_attributes(self) -> dict: + def extra_state_attributes(self) -> dict[str, Any]: """Get the state attributes for the device. The 'aux_properties' in the pyisy Node class are combined with the @@ -189,7 +189,7 @@ class ISYProgramEntity(ISYEntity): self._actions = actions @property - def extra_state_attributes(self) -> dict: + def extra_state_attributes(self) -> dict[str, Any]: """Get the state attributes for the device.""" attr = {} if self._actions: diff --git a/homeassistant/components/switchbot/entity.py b/homeassistant/components/switchbot/entity.py index bde69429bc3..282d23bfd1a 100644 --- a/homeassistant/components/switchbot/entity.py +++ b/homeassistant/components/switchbot/entity.py @@ -61,7 +61,7 @@ class SwitchbotEntity( return self.coordinator.device.parsed_data @property - def extra_state_attributes(self) -> Mapping[Any, Any]: + def extra_state_attributes(self) -> Mapping[str, Any]: """Return the state attributes.""" return {"last_run_success": self._last_run_success} diff --git a/pylint/plugins/hass_enforce_type_hints.py b/pylint/plugins/hass_enforce_type_hints.py index e2b6de6e6a3..a4590207294 100644 --- a/pylint/plugins/hass_enforce_type_hints.py +++ b/pylint/plugins/hass_enforce_type_hints.py @@ -1410,6 +1410,16 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = { ], ), ], + "entity": [ + ClassTypeHintMatch( + base_class="Entity", + matches=_ENTITY_MATCH, + ), + ClassTypeHintMatch( + base_class="RestoreEntity", + matches=_RESTORE_ENTITY_MATCH, + ), + ], "fan": [ ClassTypeHintMatch( base_class="Entity",