mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Remove unnecessary assignment of Template.hass from scrape (#123685)
This commit is contained in:
parent
efa3f228a5
commit
1c9a1c71d3
@ -67,10 +67,6 @@ async def async_setup_platform(
|
||||
|
||||
entities: list[ScrapeSensor] = []
|
||||
for sensor_config in sensors_config:
|
||||
value_template: Template | None = sensor_config.get(CONF_VALUE_TEMPLATE)
|
||||
if value_template is not None:
|
||||
value_template.hass = hass
|
||||
|
||||
trigger_entity_config = {CONF_NAME: sensor_config[CONF_NAME]}
|
||||
for key in TRIGGER_ENTITY_OPTIONS:
|
||||
if key not in sensor_config:
|
||||
@ -85,7 +81,7 @@ async def async_setup_platform(
|
||||
sensor_config[CONF_SELECT],
|
||||
sensor_config.get(CONF_ATTRIBUTE),
|
||||
sensor_config[CONF_INDEX],
|
||||
value_template,
|
||||
sensor_config.get(CONF_VALUE_TEMPLATE),
|
||||
True,
|
||||
)
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user