mirror of
https://github.com/esphome/esphome.git
synced 2025-07-28 06:06:33 +00:00
[lvgl] Prevent keyerror on min/max value widgets with no default (#9660)
This commit is contained in:
parent
72905f5f42
commit
ce3a16f03c
@ -192,7 +192,7 @@ class WidgetType:
|
|||||||
|
|
||||||
class NumberType(WidgetType):
|
class NumberType(WidgetType):
|
||||||
def get_max(self, config: dict):
|
def get_max(self, config: dict):
|
||||||
return int(config[CONF_MAX_VALUE] or 100)
|
return int(config.get(CONF_MAX_VALUE, 100))
|
||||||
|
|
||||||
def get_min(self, config: dict):
|
def get_min(self, config: dict):
|
||||||
return int(config[CONF_MIN_VALUE] or 0)
|
return int(config.get(CONF_MIN_VALUE, 0))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user