Remove unnecessary assignment of Template.hass from rss_feed_template (#123683)

This commit is contained in:
Erik Montnemery 2024-08-12 15:53:32 +02:00 committed by GitHub
parent 268044cd01
commit 81788790df
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -49,18 +49,8 @@ def setup(hass: HomeAssistant, config: ConfigType) -> bool:
requires_auth: bool = feedconfig["requires_api_password"]
title: Template | None
if (title := feedconfig.get("title")) is not None:
title.hass = hass
items: list[dict[str, Template]] = feedconfig["items"]
for item in items:
if "title" in item:
item["title"].hass = hass
if "description" in item:
item["description"].hass = hass
rss_view = RssView(url, requires_auth, title, items)
rss_view = RssView(url, requires_auth, feedconfig.get("title"), items)
hass.http.register_view(rss_view)
return True