From 7d0ae0b636db7546fcf06803c0c5c2d7822396de Mon Sep 17 00:00:00 2001 From: Shocker Date: Thu, 11 Dec 2025 13:52:28 +0200 Subject: [PATCH] Fix sensors data not being loaded correctly --- custom_components/http_agent/sensor.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/custom_components/http_agent/sensor.py b/custom_components/http_agent/sensor.py index bc37302..6c7c6a7 100644 --- a/custom_components/http_agent/sensor.py +++ b/custom_components/http_agent/sensor.py @@ -98,7 +98,11 @@ def __init__( # Find sensor config self.sensor_config = None - for config in entry.data[CONF_SENSORS]: + data = dict(entry.data) + if entry.options: + data.update(entry.options) + + for config in data[CONF_SENSORS]: if config[CONF_SENSOR_NAME] == sensor_name: self.sensor_config = config break