From 4fbe4135b145c04d7898b9e84b5cfd6953893234 Mon Sep 17 00:00:00 2001 From: Joseph Abbey Date: Sun, 19 Oct 2025 21:23:34 +0100 Subject: [PATCH 1/5] Update schema to support numeric items --- config.schema.json | 557 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 525 insertions(+), 32 deletions(-) diff --git a/config.schema.json b/config.schema.json index b69b00a..8313d7c 100644 --- a/config.schema.json +++ b/config.schema.json @@ -17,11 +17,21 @@ "$ref": "#/$defs/items" } }, - "required": ["title", "items"], + "required": [ + "title", + "items" + ], "additionalProperties": false, "$defs": { "toggle": { "type": "object", + "examples": [ + { + "type": "toggle", + "name": "Example", + "entity": "switch.example" + } + ], "properties": { "entity": { "$ref": "#/$defs/entity" @@ -37,15 +47,7 @@ "$ref": "#/$defs/content" }, "tap_action": { - "type": "object", - "properties": { - "confirm": { - "$ref": "#/$defs/confirm" - }, - "pin": { - "$ref": "#/$defs/pin" - } - }, + "$ref": "#/$defs/tap_action", "additionalProperties": false }, "enabled": { @@ -55,7 +57,11 @@ "$ref": "#/$defs/exit" } }, - "required": ["entity", "name", "type"], + "required": [ + "entity", + "name", + "type" + ], "additionalProperties": false }, "template": { @@ -86,7 +92,11 @@ "$ref": "#/$defs/enabled" } }, - "required": ["name", "content", "type"], + "required": [ + "name", + "content", + "type" + ], "additionalProperties": false }, { @@ -109,7 +119,20 @@ "description": "Use 'info' or 'tap' instead." }, "tap_action": { - "$ref": "#/$defs/tap_action" + "$ref": "#/$defs/tap_action", + "properties": { + "service": { + "$ref": "#/$defs/service" + }, + "data": { + "type": "object", + "title": "Your services's parameters", + "description": "The object containing the parameters and their values to be passed to the entity. No schema checking can be done here, you are on your own! On application crash, remove the parameters." + } + }, + "required": [ + "service" + ] }, "enabled": { "$ref": "#/$defs/enabled" @@ -118,7 +141,12 @@ "$ref": "#/$defs/exit" } }, - "required": ["name", "content", "type", "tap_action"], + "required": [ + "name", + "content", + "type", + "tap_action" + ], "additionalProperties": false } ] @@ -140,11 +168,27 @@ "$ref": "#/$defs/enabled" } }, - "required": ["name", "content", "type"], + "required": [ + "name", + "content", + "type" + ], "additionalProperties": false }, "tap": { "type": "object", + "examples": [ + { + "type": "tap", + "name": "Example", + "tap_action": { + "service": "notify.notify", + "data": { + "message": "Example" + } + } + } + ], "properties": { "entity": { "$ref": "#/$defs/entity" @@ -160,13 +204,26 @@ "$ref": "#/$defs/content" }, "service": { - "$ref": "#/$defs/entity", + "$ref": "#/$defs/service", "deprecated": true, "title": "Schema change:", "description": "Use 'tap_action' instead to mirror Home Assistant." }, "tap_action": { - "$ref": "#/$defs/tap_action" + "$ref": "#/$defs/tap_action", + "properties": { + "service": { + "$ref": "#/$defs/service" + }, + "data": { + "type": "object", + "title": "Your services's parameters", + "description": "The object containing the parameters and their values to be passed to the entity. No schema checking can be done here, you are on your own! On application crash, remove the parameters." + } + }, + "required": [ + "service" + ] }, "enabled": { "$ref": "#/$defs/enabled" @@ -175,11 +232,22 @@ "$ref": "#/$defs/exit" } }, - "required": ["name", "type"], + "required": [ + "name", + "type" + ], "additionalProperties": false }, "group": { "type": "object", + "examples": [ + { + "type": "group", + "name": "Example", + "title": "Example", + "items": [] + } + ], "properties": { "entity": { "$ref": "#/$defs/entity", @@ -210,9 +278,435 @@ "$ref": "#/$defs/enabled" } }, - "required": ["name", "title", "type", "items"], + "required": [ + "name", + "title", + "type", + "items" + ], "additionalProperties": false }, + "numeric": { + "type": "object", + "examples": [ + { + "type": "numeric", + "name": "Example", + "entity": "light.example", + "attribute": "brightness", + "service": "light.turn_on", + "service_attribute": "brightness", + "min": 0, + "max": 255, + "step": 1 + }, + { + "type": "numeric", + "name": "Example", + "entity": "input_number.example", + "service": "input_number.set_value", + "service_attribute": "value", + "min": 0, + "max": 100, + "step": 1 + }, + { + "type": "numeric", + "name": "Example", + "entity": "number.example", + "service": "number.set_value", + "service_attribute": "value", + "min": 0, + "max": 100, + "step": 1 + }, + { + "type": "numeric", + "name": "Example", + "entity": "fan.example", + "attribute": "percentage", + "service": "fan.set_percentage", + "service_attribute": "percentage", + "min": 0, + "max": 100, + "step": 1 + }, + { + "type": "numeric", + "name": "Example", + "entity": "valve.example", + "attribute": "position", + "service": "valve.set_valve_position", + "service_attribute": "position", + "min": 0, + "max": 100, + "step": 1 + }, + { + "type": "numeric", + "name": "Example", + "entity": "cover.example", + "attribute": "position", + "service": "cover.set_position", + "service_attribute": "position", + "min": 0, + "max": 100, + "step": 1 + }, + { + "type": "numeric", + "name": "Example", + "entity": "cover.example", + "attribute": "tilt_position", + "service": "cover.set_tilt_position", + "service_attribute": "tilt_position", + "min": 0, + "max": 100, + "step": 1 + }, + { + "type": "numeric", + "name": "Example", + "entity": "media_player.example", + "attribute": "volume_level", + "service": "media_player.volume_set", + "service_attribute": "volume_level", + "min": 0, + "max": 1, + "step": 0.01 + }, + { + "type": "numeric", + "name": "Example", + "entity": "climate.example", + "attribute": "temperature", + "service": "climate.set_temperature", + "service_attribute": "temperature", + "min": 0, + "max": 100, + "step": 1 + } + ], + "allOf": [ + { + "properties": { + "name": { + "$ref": "#/$defs/name" + }, + "type": { + "$ref": "#/$defs/type", + "const": "numeric" + }, + "content": { + "$ref": "#/$defs/content" + }, + "tap_action": { + "$ref": "#/$defs/tap_action" + }, + "enabled": { + "$ref": "#/$defs/enabled" + }, + "exit": { + "$ref": "#/$defs/exit" + }, + "min": { + "type": "number", + "title": "Minimum value" + }, + "max": { + "type": "number", + "title": "Maximum value" + }, + "step": { + "type": "number", + "title": "Step size" + }, + "decimals": { + "type": "number", + "title": "Number of decimals to display", + "minimum": 0, + "maximum": 10, + "default": 1 + }, + "entity": { + "$ref": "#/$defs/entity" + }, + "attribute": { + "type": "string", + "title": "Attribute on the entity with the current numeric value. To use the state of the entity, do not specify." + }, + "service": { + "$ref": "#/$defs/service" + }, + "service_attribute": { + "type": "string", + "title": "Attribute on the service data for the value to set." + } + }, + "required": [ + "name", + "type", + "min", + "max", + "step", + "entity", + "service", + "service_attribute" + ], + "additionalProperties": false + }, + { + "properties": { + "entity": { + "pattern": "^(light|input_number|number|fan|valve|cover|media_player|climate)\\.[^.]+$" + } + }, + "if": { + "properties": { + "entity": { + "pattern": "^light\\.[^.]+$" + } + } + }, + "then": { + "properties": { + "attribute": { + "const": "brightness" + }, + "service": { + "const": "light.turn_on" + }, + "service_attribute": { + "const": "brightness" + }, + "min": { + "const": 0 + }, + "max": { + "const": 255, + "description": "Lights are not a percentage." + } + } + }, + "else": { + "if": { + "properties": { + "entity": { + "pattern": "^input_number\\.[^.]+$" + } + } + }, + "then": { + "properties": { + "attribute": { + "const": "value" + }, + "service": { + "const": "input_number.set_value" + }, + "service_attribute": { + "const": "value" + } + }, + "not": { + "required": [ + "attribute" + ] + } + }, + "else": { + "if": { + "properties": { + "entity": { + "pattern": "^number\\.[^.]+$" + } + } + }, + "then": { + "properties": { + "attribute": { + "const": "value" + }, + "service": { + "const": "number.set_value" + }, + "service_attribute": { + "const": "value" + } + }, + "not": { + "required": [ + "attribute" + ] + } + }, + "else": { + "if": { + "properties": { + "entity": { + "pattern": "^fan\\.[^.]+$" + } + } + }, + "then": { + "properties": { + "attribute": { + "const": "percentage" + }, + "service": { + "const": "fan.set_percentage" + }, + "service_attribute": { + "const": "percentage" + }, + "min": { + "const": 0 + }, + "max": { + "const": 100 + } + } + }, + "else": { + "if": { + "properties": { + "entity": { + "pattern": "^valve\\.[^.]+$" + } + } + }, + "then": { + "properties": { + "attribute": { + "const": "position" + }, + "service": { + "const": "valve.set_valve_position" + }, + "service_attribute": { + "const": "position" + }, + "min": { + "const": 0 + }, + "max": { + "const": 100 + } + } + }, + "else": { + "if": { + "properties": { + "entity": { + "pattern": "^cover\\.[^.]+$" + } + } + }, + "then": { + "properties": { + "attribute": { + "const": "position" + }, + "service": { + "const": "cover.set_position" + }, + "service_attribute": { + "const": "position" + }, + "min": { + "const": 0 + }, + "max": { + "const": 100 + } + } + }, + "else": { + "if": { + "properties": { + "entity": { + "pattern": "^cover\\.[^.]+$" + } + } + }, + "then": { + "properties": { + "attribute": { + "const": "tilt_position" + }, + "service": { + "const": "cover.set_tilt_position" + }, + "service_attribute": { + "const": "tilt_position" + }, + "min": { + "const": 0 + }, + "max": { + "const": 100 + } + } + }, + "else": { + "if": { + "properties": { + "entity": { + "pattern": "^media_player\\.[^.]+$" + } + } + }, + "then": { + "properties": { + "attribute": { + "const": "volume_level" + }, + "service": { + "const": "media_player.volume_set" + }, + "service_attribute": { + "const": "volume_level" + }, + "min": { + "const": 0 + }, + "max": { + "const": 1 + } + } + }, + "else": { + "if": { + "properties": { + "entity": { + "pattern": "^climate\\.[^.]+$" + } + } + }, + "then": { + "properties": { + "attribute": { + "const": "temperature" + }, + "service": { + "const": "climate.set_temperature" + }, + "service_attribute": { + "const": "temperature" + } + } + } + } + } + } + } + } + } + } + } + } + ] + }, "type": { "title": "Menu item type", "description": "One of 'info', 'tap', 'toggle' or 'group'." @@ -235,6 +729,9 @@ }, { "$ref": "#/$defs/group" + }, + { + "$ref": "#/$defs/numeric" } ] } @@ -258,22 +755,13 @@ "title": "Action", "description": "'confirm' field is optional.", "properties": { - "service": { - "$ref": "#/$defs/service" - }, "confirm": { "$ref": "#/$defs/confirm" }, "pin": { "$ref": "#/$defs/pin" - }, - "data": { - "type": "object", - "title": "Your services's parameters", - "description": "The object containing the parameters and their values to be passed to the entity. No schema checking can be done here, you are on your own! On application crash, remove the parameters." } - }, - "required": ["service"] + } }, "content": { "title": "Home Assistant Template", @@ -307,7 +795,10 @@ "$ref": "#/$defs/content" } }, - "required": ["type", "content"] + "required": [ + "type", + "content" + ] }, { "properties": { @@ -317,7 +808,9 @@ "const": "status" } }, - "required": ["type"] + "required": [ + "type" + ] } ] }, @@ -334,4 +827,4 @@ "description": "Choose to exit the application after this item has been selected. Disabled (false) by default. N.B. Only actionable menu items can have this field added." } } -} +} \ No newline at end of file From 427c1834a8ff82d105d5d7e8af6d2c97a4d35ccf Mon Sep 17 00:00:00 2001 From: Joseph Abbey Date: Tue, 21 Oct 2025 09:03:49 +0100 Subject: [PATCH 2/5] --- config.schema.json | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/config.schema.json b/config.schema.json index 8313d7c..b23c9ce 100644 --- a/config.schema.json +++ b/config.schema.json @@ -295,7 +295,7 @@ "entity": "light.example", "attribute": "brightness", "service": "light.turn_on", - "service_attribute": "brightness", + "data_attribute": "brightness", "min": 0, "max": 255, "step": 1 @@ -305,7 +305,7 @@ "name": "Example", "entity": "input_number.example", "service": "input_number.set_value", - "service_attribute": "value", + "data_attribute": "value", "min": 0, "max": 100, "step": 1 @@ -315,7 +315,7 @@ "name": "Example", "entity": "number.example", "service": "number.set_value", - "service_attribute": "value", + "data_attribute": "value", "min": 0, "max": 100, "step": 1 @@ -326,7 +326,7 @@ "entity": "fan.example", "attribute": "percentage", "service": "fan.set_percentage", - "service_attribute": "percentage", + "data_attribute": "percentage", "min": 0, "max": 100, "step": 1 @@ -337,7 +337,7 @@ "entity": "valve.example", "attribute": "position", "service": "valve.set_valve_position", - "service_attribute": "position", + "data_attribute": "position", "min": 0, "max": 100, "step": 1 @@ -348,7 +348,7 @@ "entity": "cover.example", "attribute": "position", "service": "cover.set_position", - "service_attribute": "position", + "data_attribute": "position", "min": 0, "max": 100, "step": 1 @@ -359,7 +359,7 @@ "entity": "cover.example", "attribute": "tilt_position", "service": "cover.set_tilt_position", - "service_attribute": "tilt_position", + "data_attribute": "tilt_position", "min": 0, "max": 100, "step": 1 @@ -370,7 +370,7 @@ "entity": "media_player.example", "attribute": "volume_level", "service": "media_player.volume_set", - "service_attribute": "volume_level", + "data_attribute": "volume_level", "min": 0, "max": 1, "step": 0.01 @@ -381,7 +381,7 @@ "entity": "climate.example", "attribute": "temperature", "service": "climate.set_temperature", - "service_attribute": "temperature", + "data_attribute": "temperature", "min": 0, "max": 100, "step": 1 @@ -438,7 +438,7 @@ "service": { "$ref": "#/$defs/service" }, - "service_attribute": { + "data_attribute": { "type": "string", "title": "Attribute on the service data for the value to set." } @@ -451,7 +451,7 @@ "step", "entity", "service", - "service_attribute" + "data_attribute" ], "additionalProperties": false }, @@ -476,7 +476,7 @@ "service": { "const": "light.turn_on" }, - "service_attribute": { + "data_attribute": { "const": "brightness" }, "min": { @@ -504,7 +504,7 @@ "service": { "const": "input_number.set_value" }, - "service_attribute": { + "data_attribute": { "const": "value" } }, @@ -530,7 +530,7 @@ "service": { "const": "number.set_value" }, - "service_attribute": { + "data_attribute": { "const": "value" } }, @@ -556,7 +556,7 @@ "service": { "const": "fan.set_percentage" }, - "service_attribute": { + "data_attribute": { "const": "percentage" }, "min": { @@ -583,7 +583,7 @@ "service": { "const": "valve.set_valve_position" }, - "service_attribute": { + "data_attribute": { "const": "position" }, "min": { @@ -610,7 +610,7 @@ "service": { "const": "cover.set_position" }, - "service_attribute": { + "data_attribute": { "const": "position" }, "min": { @@ -637,7 +637,7 @@ "service": { "const": "cover.set_tilt_position" }, - "service_attribute": { + "data_attribute": { "const": "tilt_position" }, "min": { @@ -664,7 +664,7 @@ "service": { "const": "media_player.volume_set" }, - "service_attribute": { + "data_attribute": { "const": "volume_level" }, "min": { @@ -691,7 +691,7 @@ "service": { "const": "climate.set_temperature" }, - "service_attribute": { + "data_attribute": { "const": "temperature" } } From 35e0fe26d05d066c346c56fe4757f71e383e2913 Mon Sep 17 00:00:00 2001 From: Joseph Abbey Date: Tue, 21 Oct 2025 09:05:15 +0100 Subject: [PATCH 3/5] Amendments --- config.schema.json | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/config.schema.json b/config.schema.json index b23c9ce..d176296 100644 --- a/config.schema.json +++ b/config.schema.json @@ -421,12 +421,10 @@ "type": "number", "title": "Step size" }, - "decimals": { - "type": "number", - "title": "Number of decimals to display", - "minimum": 0, - "maximum": 10, - "default": 1 + "display_format": { + "type": "string", + "title": "A C-Style format string for displaying the value in the UI.", + "default": "%.1f" }, "entity": { "$ref": "#/$defs/entity" From 85080f5d46d7783032624a57ec092120a1000361 Mon Sep 17 00:00:00 2001 From: Joseph Abbey Date: Tue, 21 Oct 2025 10:07:43 +0100 Subject: [PATCH 4/5] --- config.schema.json | 121 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 95 insertions(+), 26 deletions(-) diff --git a/config.schema.json b/config.schema.json index d176296..68fd951 100644 --- a/config.schema.json +++ b/config.schema.json @@ -329,7 +329,8 @@ "data_attribute": "percentage", "min": 0, "max": 100, - "step": 1 + "step": 1, + "display_format": "%.0f%%" }, { "type": "numeric", @@ -381,10 +382,7 @@ "entity": "climate.example", "attribute": "temperature", "service": "climate.set_temperature", - "data_attribute": "temperature", - "min": 0, - "max": 100, - "step": 1 + "data_attribute": "temperature" } ], "allOf": [ @@ -411,19 +409,20 @@ }, "min": { "type": "number", - "title": "Minimum value" + "title": "Minimum Value" }, "max": { "type": "number", - "title": "Maximum value" + "title": "Maximum Value" }, "step": { "type": "number", - "title": "Step size" + "title": "Step Size" }, "display_format": { "type": "string", - "title": "A C-Style format string for displaying the value in the UI.", + "title": "Display Format", + "description": "A C-Style format string for displaying the value in the UI. https://developer.garmin.com/connect-iq/api-docs/Toybox/Lang/Number.html#format-instance_function", "default": "%.1f" }, "entity": { @@ -431,14 +430,16 @@ }, "attribute": { "type": "string", - "title": "Attribute on the entity with the current numeric value. To use the state of the entity, do not specify." + "title": "Attribute on the entity", + "description": "Attribute on the entity with the current numeric value. To use the state of the entity, do not specify." }, "service": { "$ref": "#/$defs/service" }, "data_attribute": { "type": "string", - "title": "Attribute on the service data for the value to set." + "title": "Attribute on the service data", + "description": "Attribute on the service data for the value to set." } }, "required": [ @@ -712,24 +713,92 @@ "items": { "type": "array", "items": { - "oneOf": [ + "allOf": [ { - "$ref": "#/$defs/toggle" + "properties": { + "type": { + "enum": [ + "toggle", + "template", + "tap", + "info", + "group", + "numeric" + ] + } + } }, { - "$ref": "#/$defs/template" - }, - { - "$ref": "#/$defs/tap" - }, - { - "$ref": "#/$defs/info" - }, - { - "$ref": "#/$defs/group" - }, - { - "$ref": "#/$defs/numeric" + "if": { + "properties": { + "type": { + "const": "toggle" + } + } + }, + "then": { + "$ref": "#/$defs/toggle" + }, + "else": { + "if": { + "properties": { + "type": { + "const": "template" + } + } + }, + "then": { + "$ref": "#/$defs/template" + }, + "else": { + "if": { + "properties": { + "type": { + "const": "tap" + } + } + }, + "then": { + "$ref": "#/$defs/tap" + }, + "else": { + "if": { + "properties": { + "type": { + "const": "info" + } + } + }, + "then": { + "$ref": "#/$defs/info" + }, + "else": { + "if": { + "properties": { + "type": { + "const": "group" + } + } + }, + "then": { + "$ref": "#/$defs/group" + }, + "else": { + "if": { + "properties": { + "type": { + "const": "numeric" + } + } + }, + "then": { + "$ref": "#/$defs/numeric" + } + } + } + } + } + } } ] } From 5bdab41d8ba9aff8ec43b352fbb59d798b5fe6f7 Mon Sep 17 00:00:00 2001 From: Joseph Abbey Date: Tue, 21 Oct 2025 19:10:35 +0100 Subject: [PATCH 5/5] Fix examples lists --- config.schema.json | 242 ++++++++++++++++++++++----------------------- 1 file changed, 118 insertions(+), 124 deletions(-) diff --git a/config.schema.json b/config.schema.json index 68fd951..d73a0e3 100644 --- a/config.schema.json +++ b/config.schema.json @@ -25,13 +25,6 @@ "$defs": { "toggle": { "type": "object", - "examples": [ - { - "type": "toggle", - "name": "Example", - "entity": "switch.example" - } - ], "properties": { "entity": { "$ref": "#/$defs/entity" @@ -177,18 +170,6 @@ }, "tap": { "type": "object", - "examples": [ - { - "type": "tap", - "name": "Example", - "tap_action": { - "service": "notify.notify", - "data": { - "message": "Example" - } - } - } - ], "properties": { "entity": { "$ref": "#/$defs/entity" @@ -240,14 +221,6 @@ }, "group": { "type": "object", - "examples": [ - { - "type": "group", - "name": "Example", - "title": "Example", - "items": [] - } - ], "properties": { "entity": { "$ref": "#/$defs/entity", @@ -288,103 +261,6 @@ }, "numeric": { "type": "object", - "examples": [ - { - "type": "numeric", - "name": "Example", - "entity": "light.example", - "attribute": "brightness", - "service": "light.turn_on", - "data_attribute": "brightness", - "min": 0, - "max": 255, - "step": 1 - }, - { - "type": "numeric", - "name": "Example", - "entity": "input_number.example", - "service": "input_number.set_value", - "data_attribute": "value", - "min": 0, - "max": 100, - "step": 1 - }, - { - "type": "numeric", - "name": "Example", - "entity": "number.example", - "service": "number.set_value", - "data_attribute": "value", - "min": 0, - "max": 100, - "step": 1 - }, - { - "type": "numeric", - "name": "Example", - "entity": "fan.example", - "attribute": "percentage", - "service": "fan.set_percentage", - "data_attribute": "percentage", - "min": 0, - "max": 100, - "step": 1, - "display_format": "%.0f%%" - }, - { - "type": "numeric", - "name": "Example", - "entity": "valve.example", - "attribute": "position", - "service": "valve.set_valve_position", - "data_attribute": "position", - "min": 0, - "max": 100, - "step": 1 - }, - { - "type": "numeric", - "name": "Example", - "entity": "cover.example", - "attribute": "position", - "service": "cover.set_position", - "data_attribute": "position", - "min": 0, - "max": 100, - "step": 1 - }, - { - "type": "numeric", - "name": "Example", - "entity": "cover.example", - "attribute": "tilt_position", - "service": "cover.set_tilt_position", - "data_attribute": "tilt_position", - "min": 0, - "max": 100, - "step": 1 - }, - { - "type": "numeric", - "name": "Example", - "entity": "media_player.example", - "attribute": "volume_level", - "service": "media_player.volume_set", - "data_attribute": "volume_level", - "min": 0, - "max": 1, - "step": 0.01 - }, - { - "type": "numeric", - "name": "Example", - "entity": "climate.example", - "attribute": "temperature", - "service": "climate.set_temperature", - "data_attribute": "temperature" - } - ], "allOf": [ { "properties": { @@ -713,6 +589,124 @@ "items": { "type": "array", "items": { + "examples": [ + { + "type": "tap", + "name": "Example", + "tap_action": { + "service": "notify.notify", + "data": { + "message": "Example" + } + } + }, + { + "type": "toggle", + "name": "Example", + "entity": "switch.example" + }, + { + "type": "group", + "name": "Example", + "title": "Example", + "items": [] + }, + { + "type": "numeric", + "name": "Example", + "entity": "light.example", + "attribute": "brightness", + "service": "light.turn_on", + "data_attribute": "brightness", + "min": 0, + "max": 255, + "step": 1 + }, + { + "type": "numeric", + "name": "Example", + "entity": "input_number.example", + "service": "input_number.set_value", + "data_attribute": "value", + "min": 0, + "max": 100, + "step": 1 + }, + { + "type": "numeric", + "name": "Example", + "entity": "number.example", + "service": "number.set_value", + "data_attribute": "value", + "min": 0, + "max": 100, + "step": 1 + }, + { + "type": "numeric", + "name": "Example", + "entity": "fan.example", + "attribute": "percentage", + "service": "fan.set_percentage", + "data_attribute": "percentage", + "min": 0, + "max": 100, + "step": 1, + "display_format": "%.0f%%" + }, + { + "type": "numeric", + "name": "Example", + "entity": "valve.example", + "attribute": "position", + "service": "valve.set_valve_position", + "data_attribute": "position", + "min": 0, + "max": 100, + "step": 1 + }, + { + "type": "numeric", + "name": "Example", + "entity": "cover.example", + "attribute": "position", + "service": "cover.set_position", + "data_attribute": "position", + "min": 0, + "max": 100, + "step": 1 + }, + { + "type": "numeric", + "name": "Example", + "entity": "cover.example", + "attribute": "tilt_position", + "service": "cover.set_tilt_position", + "data_attribute": "tilt_position", + "min": 0, + "max": 100, + "step": 1 + }, + { + "type": "numeric", + "name": "Example", + "entity": "media_player.example", + "attribute": "volume_level", + "service": "media_player.volume_set", + "data_attribute": "volume_level", + "min": 0, + "max": 1, + "step": 0.01 + }, + { + "type": "numeric", + "name": "Example", + "entity": "climate.example", + "attribute": "temperature", + "service": "climate.set_temperature", + "data_attribute": "temperature" + } + ], "allOf": [ { "properties": {