From ffa7aab1ef62d7695cffe98c9874992bb58df551 Mon Sep 17 00:00:00 2001 From: Gabriel Rauter Date: Sun, 14 Aug 2022 12:17:46 +0200 Subject: [PATCH] Fix missing default in integration options --- custom_components/thermal_comfort/config_flow.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/custom_components/thermal_comfort/config_flow.py b/custom_components/thermal_comfort/config_flow.py index f541b3e..16ffe28 100644 --- a/custom_components/thermal_comfort/config_flow.py +++ b/custom_components/thermal_comfort/config_flow.py @@ -370,14 +370,24 @@ def build_schema( vol.Required( CONF_NAME, default=get_value(config_entry, CONF_NAME, DEFAULT_NAME) ): str, - vol.Required(CONF_TEMPERATURE_SENSOR): selector( + vol.Required( + CONF_TEMPERATURE_SENSOR, + default=get_value( + config_entry, CONF_TEMPERATURE_SENSOR, temperature_sensors[0] + ), + ): selector( { "entity": { "include_entities": temperature_sensors, } } ), - vol.Required(CONF_HUMIDITY_SENSOR): selector( + vol.Required( + CONF_HUMIDITY_SENSOR, + default=get_value( + config_entry, CONF_HUMIDITY_SENSOR, humidity_sensors[0] + ), + ): selector( { "entity": { "include_entities": humidity_sensors,