diff --git a/esphome/components/lvgl/widgets/arc.py b/esphome/components/lvgl/widgets/arc.py index c037da72ed..65f0e785b6 100644 --- a/esphome/components/lvgl/widgets/arc.py +++ b/esphome/components/lvgl/widgets/arc.py @@ -67,13 +67,13 @@ class ArcType(NumberType): lv.arc_set_mode(w.obj, literal(config[CONF_MODE])) lv.arc_set_change_rate(w.obj, config[CONF_CHANGE_RATE]) - adjustable = config.get(CONF_ADJUSTABLE) - if adjustable is False: - lv_obj.remove_style(w.obj, nullptr, literal("LV_PART_KNOB")) - w.clear_flag("LV_OBJ_FLAG_CLICKABLE") - elif adjustable is True and CONF_GROUP not in config: - # For some reason arc does not get automatically added to the default group - lv.group_add_obj(lv_expr.group_get_default(), w.obj) + if CONF_ADJUSTABLE in config: + if not config[CONF_ADJUSTABLE]: + lv_obj.remove_style(w.obj, nullptr, literal("LV_PART_KNOB")) + w.clear_flag("LV_OBJ_FLAG_CLICKABLE") + elif CONF_GROUP not in config: + # For some reason arc does not get automatically added to the default group + lv.group_add_obj(lv_expr.group_get_default(), w.obj) value = await get_start_value(config) if value is not None: