From eb57f6d7bf1edf3167bd03ccb126a7168d44072f Mon Sep 17 00:00:00 2001 From: Bram Date: Wed, 1 Jan 2025 17:33:09 +0100 Subject: [PATCH] feat: add number selector to JSON schema --- .../powercalc/power_profile/power_profile.py | 2 +- profile_library/model_schema.json | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/custom_components/powercalc/power_profile/power_profile.py b/custom_components/powercalc/power_profile/power_profile.py index 6e6a74268..bd2d82841 100644 --- a/custom_components/powercalc/power_profile/power_profile.py +++ b/custom_components/powercalc/power_profile/power_profile.py @@ -186,7 +186,7 @@ def linear_config(self) -> ConfigType | None: @property def multi_switch_config(self) -> ConfigType | None: - """Get configuration to set up linear strategy.""" + """Get configuration to set up multi_switch strategy.""" return self.get_strategy_config(CalculationStrategy.MULTI_SWITCH) @property diff --git a/profile_library/model_schema.json b/profile_library/model_schema.json index dd6c997d4..e0cd0bbb2 100644 --- a/profile_library/model_schema.json +++ b/profile_library/model_schema.json @@ -141,6 +141,17 @@ "type": "string" } } + }, + "number": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + } } } }