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