From aa937b16400c937b884c5ef1c5865758935f478a Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 22 May 2023 01:52:49 -0500 Subject: [PATCH] Use slots for template RenderInfo (#93337) --- homeassistant/helpers/template.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/homeassistant/helpers/template.py b/homeassistant/helpers/template.py index 6ff48d83241..d40a0289ab8 100644 --- a/homeassistant/helpers/template.py +++ b/homeassistant/helpers/template.py @@ -329,6 +329,22 @@ _cached_literal_eval = lru_cache(maxsize=EVAL_CACHE_SIZE)(literal_eval) class RenderInfo: """Holds information about a template render.""" + __slots__ = ( + "template", + "filter_lifecycle", + "filter", + "_result", + "is_static", + "exception", + "all_states", + "all_states_lifecycle", + "domains", + "domains_lifecycle", + "entities", + "rate_limit", + "has_time", + ) + def __init__(self, template: Template) -> None: """Initialise.""" self.template = template