waterfall config fine-adjustments
* hide the waterfall colors input when pre-defined color scheme is selected * skip unparseable lines on custom color input * fallback to black and white if custom color config is unusable * always use the waterfall classes when sending changes to the client
This commit is contained in:
@@ -287,7 +287,12 @@ class Ha7ilmWaterfall(Waterfall):
|
||||
class CustomWaterfall(Waterfall):
|
||||
def __init__(self):
|
||||
config = Config.get()
|
||||
super().__init__(config["waterfall_colors"])
|
||||
if "waterfall_colors" in config and config["waterfall_colors"]:
|
||||
colors = config["waterfall_colors"]
|
||||
else:
|
||||
# fallback: black and white
|
||||
colors = [0x000000, 0xffffff]
|
||||
super().__init__(colors)
|
||||
|
||||
|
||||
class WaterfallOptions(DropdownEnum):
|
||||
|
||||
Reference in New Issue
Block a user