Skip to content

Commit

Permalink
Add support for blueprint collapsable sections
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck committed Oct 5, 2024
1 parent 5606832 commit 76a7c64
Showing 1 changed file with 35 additions and 1 deletion.
36 changes: 35 additions & 1 deletion src/language-service/src/schemas/integrations/core/blueprint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ interface Blueprint {
* https://www.home-assistant.io/docs/blueprint/schema/#input
*/
input?: {
[key: string]: BlueprintInputSchema;
[key: string]: BlueprintInputSchema | BlueprintInputSectionSchema;
};

/**
Expand Down Expand Up @@ -102,3 +102,37 @@ interface BlueprintInputSchema {
*/
selector?: Selector;
}

interface BlueprintInputSectionSchema {
/**
* A name for the section. If omitted the key of the section is used.
* https://www.home-assistant.io/docs/blueprint/schema/#name
*/
name?: string;

/**
* An optional description of this section, which will be displayed at the top of the section. The description can include Markdown.
* https://www.home-assistant.io/docs/blueprint/schema/#description
*/
description?: string;

/**
* An icon to display next to the name of the section.
* https://www.home-assistant.io/docs/blueprint/schema/#icon
*/
icon?: string;

/**
* If true, the section will be collapsed by default. Useful for optional or less important inputs. All collapsed inputs must also have a defined default before they can be hidden.
* https://www.home-assistant.io/docs/blueprint/schema/#collapsed
*/
collapsed?: boolean;

/**
* A dictionary of defined user inputs within this section.
* https://www.home-assistant.io/docs/blueprint/schema/#input
*/
input: {
[key: string]: BlueprintInputSchema;
};
}

0 comments on commit 76a7c64

Please sign in to comment.