From 5606832a0da783a5a6f6b2d7bdc66d5729b331fa Mon Sep 17 00:00:00 2001 From: Skully Date: Sat, 5 Oct 2024 09:12:24 +0100 Subject: [PATCH 01/16] add missing use_x_frame_options to http (#3202) --- src/language-service/src/schemas/integrations/core/http.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/language-service/src/schemas/integrations/core/http.ts b/src/language-service/src/schemas/integrations/core/http.ts index 054c87d764..c3aef1dd5a 100644 --- a/src/language-service/src/schemas/integrations/core/http.ts +++ b/src/language-service/src/schemas/integrations/core/http.ts @@ -86,4 +86,10 @@ export interface Schema { * https://www.home-assistant.io/integrations/http#use_x_forwarded_for */ use_x_forwarded_for?: boolean; + + /** + * Controls the `X-Frame-Options` header to help prevent clickjacking. + * https://www.home-assistant.io/integrations/http#use_x_frame_options + */ + use_x_frame_options?: boolean; } From 1ff825c56f017e1f0cdf7be39fc5c6d346ab07a3 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 5 Oct 2024 10:27:33 +0200 Subject: [PATCH 02/16] Add support for blueprint collapsable sections (#3204) --- .../schemas/integrations/core/blueprint.ts | 36 ++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/src/language-service/src/schemas/integrations/core/blueprint.ts b/src/language-service/src/schemas/integrations/core/blueprint.ts index 312afa50a9..2579555634 100644 --- a/src/language-service/src/schemas/integrations/core/blueprint.ts +++ b/src/language-service/src/schemas/integrations/core/blueprint.ts @@ -62,7 +62,7 @@ interface Blueprint { * https://www.home-assistant.io/docs/blueprint/schema/#input */ input?: { - [key: string]: BlueprintInputSchema; + [key: string]: BlueprintInputSchema | BlueprintInputSectionSchema; }; /** @@ -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; + }; +} From 64e943d8a5ea95e63d63f55ef51bb33fc41a5bd0 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 5 Oct 2024 10:31:20 +0200 Subject: [PATCH 03/16] Clean up removed MQTT YAML configuration (#3205) --- .../src/schemas/integrations/core/mqtt.ts | 139 ------------------ 1 file changed, 139 deletions(-) diff --git a/src/language-service/src/schemas/integrations/core/mqtt.ts b/src/language-service/src/schemas/integrations/core/mqtt.ts index 7cc426dff7..19697ef752 100644 --- a/src/language-service/src/schemas/integrations/core/mqtt.ts +++ b/src/language-service/src/schemas/integrations/core/mqtt.ts @@ -42,145 +42,6 @@ type Availability = { }; export interface Schema { - /** - * Birth Message - * https://www.home-assistant.io/docs/mqtt/birth_will/#birth_message - */ - birth_message?: { - /** - * The MQTT topic to publish the message. - * https://www.home-assistant.io/docs/mqtt/birth_will/#topic - */ - topic?: string; - - /** - * The message content. - * https://www.home-assistant.io/docs/mqtt/birth_will/#payload - */ - payload?: string; - - /** - * The maximum QoS level of the topic. - * https://www.home-assistant.io/docs/mqtt/birth_will/#qos - */ - qos?: QOS; - - /** - * If the published message should have the retain flag on or not. - * https://www.home-assistant.io/docs/mqtt/birth_will/#retain - */ - retain?: boolean; - }; - - /** - * The IP address or hostname of your MQTT broker, e.g., 192.168.1.32. - * https://www.home-assistant.io/docs/mqtt/broker#broker - */ - broker?: string; - - /** - * Path to the certificate file, e.g., /ssl/server.crt. - * https://www.home-assistant.io/docs/mqtt/broker#certificate - */ - certificate?: string; - - /** - * Client certificate, e.g., /home/user/owntracks/cookie.crt. - * https://www.home-assistant.io/docs/mqtt/certificate/#client_cert - */ - client_cert?: string; - - /** - * The client ID that Home Assistant will use. Has to be unique on the server. Default is a randomly generated one. - * https://www.home-assistant.io/docs/mqtt/broker#client_id - */ - client_id?: string; - - /** - * Client key, e.g., /home/user/owntracks/cookie.key. - * https://www.home-assistant.io/docs/mqtt/certificate/#client_key - */ - client_key?: string; - - /** - * The prefix for the discovery topic. - * https://www.home-assistant.io/docs/mqtt/discovery/#discovery_prefix - */ - discovery_prefix?: string; - - /** - * If the MQTT discovery should be enabled or not. - * https://www.home-assistant.io/docs/mqtt/discovery/#discovery - */ - discovery?: boolean; - - /** - * The time in seconds between sending keep alive messages for this client. Default is 60. - * https://www.home-assistant.io/docs/mqtt/broker#keepalive - * - * @min 15 - */ - keepalive?: PositiveInteger; - - /** - * The corresponding password for the username to use with your MQTT broker. - * https://www.home-assistant.io/docs/mqtt/broker#password - */ - password?: string; - - /** - * The network port to connect to. Default is 1883. - */ - port?: Port; - - /** - * Protocol to use: 3.1 or 3.1.1. By default it connects with 3.1.1 and falls back to 3.1 if server does not support 3.1.1. - * https://www.home-assistant.io/docs/mqtt/broker#protocol - */ - protocol?: "3.1" | "3.1.1"; - - /** - * Set the verification of the server hostname in the server certificate. - * https://www.home-assistant.io/docs/mqtt/broker#tls_insecure - */ - tls_insecure?: boolean; - - /** - * The username to use with your MQTT broker. - * https://www.home-assistant.io/docs/mqtt/broker#username - */ - username?: string; - - /** - * Will Message. - * https://www.home-assistant.io/docs/mqtt/birth_will/#will_message - */ - will_message?: { - /** - * The MQTT topic to publish the message. - * https://www.home-assistant.io/docs/mqtt/birth_will/#topic - */ - topic?: string; - - /** - * The message content. - * https://www.home-assistant.io/docs/mqtt/birth_will/#payload - */ - payload?: string; - - /** - * The maximum QoS level of the topic. - * https://www.home-assistant.io/docs/mqtt/birth_will/#qos - */ - qos?: QOS; - - /** - * If the published message should have the retain flag on or not. - * https://www.home-assistant.io/docs/mqtt/birth_will/#retain - */ - retain?: boolean; - }; - /** * The mqtt alarm panel platform enables the possibility to control MQTT capable alarm panels. The Alarm icon will change state after receiving a new state from state_topic. * https://www.home-assistant.io/integrations/alarm_control_panel.mqtt/ From d75d02d28319b33466ccce283863d9d7845f350e Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 5 Oct 2024 10:33:16 +0200 Subject: [PATCH 04/16] Add support for the assist pipeline selector (#3206) --- .../src/schemas/integrations/selectors.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/language-service/src/schemas/integrations/selectors.ts b/src/language-service/src/schemas/integrations/selectors.ts index fe3e021e54..ba131a18f4 100644 --- a/src/language-service/src/schemas/integrations/selectors.ts +++ b/src/language-service/src/schemas/integrations/selectors.ts @@ -16,6 +16,7 @@ export type Selector = | AddonSelector | AreaSelector | AttributeSelector + | AssistPipelineSelectors | BooleanSelector | ColorRGBSelector | ColorTempSelector @@ -80,6 +81,14 @@ export interface AreaSelector { } | null; } +export interface AssistPipelineSelectors { + /** + * The assist pipeline selector shows all available assist pipelines (assistants) of which one can be selected. + * https://www.home-assistant.io/docs/blueprint/selectors/#assist-pipeline-selector + */ + assist_pipeline: null | Record; +} + export interface AttributeSelector { /** * The attributes selector shows a list of state attribites from a provided entity of which one can be selected. From 7b7fd8ed3bd1ebef3f34dce418d115953ae55798 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 5 Oct 2024 10:37:59 +0200 Subject: [PATCH 05/16] Add support for the backup location selector (#3207) --- .../src/schemas/integrations/selectors.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/language-service/src/schemas/integrations/selectors.ts b/src/language-service/src/schemas/integrations/selectors.ts index ba131a18f4..23b0494a1e 100644 --- a/src/language-service/src/schemas/integrations/selectors.ts +++ b/src/language-service/src/schemas/integrations/selectors.ts @@ -15,8 +15,9 @@ export type Selector = | ActionSelector | AddonSelector | AreaSelector + | AssistPipelineSelector | AttributeSelector - | AssistPipelineSelectors + | BackupLocationSelector | BooleanSelector | ColorRGBSelector | ColorTempSelector @@ -81,7 +82,7 @@ export interface AreaSelector { } | null; } -export interface AssistPipelineSelectors { +export interface AssistPipelineSelector { /** * The assist pipeline selector shows all available assist pipelines (assistants) of which one can be selected. * https://www.home-assistant.io/docs/blueprint/selectors/#assist-pipeline-selector @@ -103,6 +104,14 @@ export interface AttributeSelector { }; } +export interface BackupLocationSelector { + /** + * The backup location selector shows a list of places a backup could go, depending on what you have configured in storage. + * https://www.home-assistant.io/docs/blueprint/selectors/#backup-location-selector + */ + backup_location: null | Record; +} + export interface BooleanSelector { /** * The boolean selector shows a toggle that allows the user to turn on or off the selected option. From 10beeb57b9ec8d545314c53802c5c42eab866d7d Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 5 Oct 2024 10:43:32 +0200 Subject: [PATCH 06/16] Add support for the constant selector (#3208) --- .../src/schemas/integrations/selectors.ts | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/language-service/src/schemas/integrations/selectors.ts b/src/language-service/src/schemas/integrations/selectors.ts index 23b0494a1e..9da476e2a0 100644 --- a/src/language-service/src/schemas/integrations/selectors.ts +++ b/src/language-service/src/schemas/integrations/selectors.ts @@ -23,6 +23,7 @@ export type Selector = | ColorTempSelector | ConditionSelector | ConfigEntrySelector + | ConstantSelector | DateSelector | DateTimeSelector | DeviceSelector @@ -170,6 +171,26 @@ export interface ConfigEntrySelector { } | null; } +export interface ConstantSelector { + /** + * The constant selector shows a toggle that allows the user to enable the selected option. This is similar to the boolean selector, the difference is that the constant selector has no value when it’s not enabled. + * https://www.home-assistant.io/docs/blueprint/selectors/#constant-selector + */ + constant: { + /** + * The label that is show in the UI for this constant. + * https://www.home-assistant.io/docs/blueprint/selectors/#constant-selector + */ + label: string; + + /** + * Value that is returned when this constant is enabled by the user + * https://www.home-assistant.io/docs/blueprint/selectors/#constant-selector + */ + value: string; + }; +} + export interface DateSelector { /** * The date selector shows a date input that allows the user to specify a date. From 9e997aa4e30f1077d9e76a0e967775a75e17036b Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 5 Oct 2024 10:48:23 +0200 Subject: [PATCH 07/16] Add support for the conversation agent selector (#3209) --- .../src/schemas/integrations/selectors.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/language-service/src/schemas/integrations/selectors.ts b/src/language-service/src/schemas/integrations/selectors.ts index 9da476e2a0..2414eef580 100644 --- a/src/language-service/src/schemas/integrations/selectors.ts +++ b/src/language-service/src/schemas/integrations/selectors.ts @@ -24,6 +24,7 @@ export type Selector = | ConditionSelector | ConfigEntrySelector | ConstantSelector + | ConversationAgentSelector | DateSelector | DateTimeSelector | DeviceSelector @@ -191,6 +192,20 @@ export interface ConstantSelector { }; } +export interface ConversationAgentSelector { + /** + * The conversation agent selector allows picking a conversation agent. + * https://www.home-assistant.io/docs/blueprint/selectors/#conversation-agent-selector + */ + conversation_agent: { + /** + * Limits the list of conversation agents to those supporting the specified language. + * https://www.home-assistant.io/docs/blueprint/selectors/#conversation-agent-selector + */ + language?: string; + } | null; +} + export interface DateSelector { /** * The date selector shows a date input that allows the user to specify a date. From 3a83069ab388c53dad4bfa566136678a424a0596 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 5 Oct 2024 10:53:27 +0200 Subject: [PATCH 08/16] Add support for the country selector (#3210) --- .../src/schemas/integrations/selectors.ts | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/language-service/src/schemas/integrations/selectors.ts b/src/language-service/src/schemas/integrations/selectors.ts index 2414eef580..8e9d3447c0 100644 --- a/src/language-service/src/schemas/integrations/selectors.ts +++ b/src/language-service/src/schemas/integrations/selectors.ts @@ -25,6 +25,7 @@ export type Selector = | ConfigEntrySelector | ConstantSelector | ConversationAgentSelector + | CountrySelector | DateSelector | DateTimeSelector | DeviceSelector @@ -206,6 +207,26 @@ export interface ConversationAgentSelector { } | null; } +export interface CountrySelector { + /** + * The country selector allows a user to pick a country from a list of countries. + * https://www.home-assistant.io/docs/blueprint/selectors/#country-selector + */ + country: { + /** + * A list of countries to pick from, this should be ISO 3166 country codes. + * https://www.home-assistant.io/docs/blueprint/selectors/#country-selector + */ + countries?: string[]; + + /** + * Should the options be sorted by name, if set to true, the order of the provided countries is kept. + * https://www.home-assistant.io/docs/blueprint/selectors/#country-selector + */ + no_sort?: boolean; + } | null; +} + export interface DateSelector { /** * The date selector shows a date input that allows the user to specify a date. From a503c5d9531814cbc024fad1651d784ccd8e7c27 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 5 Oct 2024 10:59:19 +0200 Subject: [PATCH 09/16] Add support for the floor selector (#3212) --- .../src/schemas/integrations/selectors.ts | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/language-service/src/schemas/integrations/selectors.ts b/src/language-service/src/schemas/integrations/selectors.ts index 8e9d3447c0..b02a6423e3 100644 --- a/src/language-service/src/schemas/integrations/selectors.ts +++ b/src/language-service/src/schemas/integrations/selectors.ts @@ -31,6 +31,7 @@ export type Selector = | DeviceSelector | DurationSelector | EntitySelector + | FloorSelector | IconSelector | LocationSelector | MediaSelector @@ -387,6 +388,32 @@ export interface EntitySelector { } | null; } +export interface FloorSelector { + /** + * The icon selector shows an icon picker that allows the user to select an icon. + * https://www.home-assistant.io/docs/blueprint/selectors/#floor-selector + */ + floor: { + /** + * When device options are provided, the list of floors is filtered by floors that have at least one device matching the given conditions. + * https://www.home-assistant.io/docs/blueprint/selectors/#floor-selector + */ + device?: DeviceSelectorFilter | DeviceSelectorFilter[]; + + /** + * When entity options are provided, the list only includes floors that at least have one entity that matches the given conditions. + * https://www.home-assistant.io/docs/blueprint/selectors/#floor-selector + */ + entity?: EntitySelectorFilter | EntitySelectorFilter[]; + + /** + * Allows selecting multiple floors. If set to true, the resulting value of this selector will be a list instead of a single string value. + * https://www.home-assistant.io/docs/blueprint/selectors/#floor-selector + */ + multiple?: boolean; + } | null; +} + export interface IconSelector { /** * The icon selector shows an icon picker that allows the user to select an icon. From a02d4559ba995a638b3495d0fba7b005ab6aa33d Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 5 Oct 2024 10:59:27 +0200 Subject: [PATCH 10/16] Add enable_milisecond suppor to duration selector (#3211) --- src/language-service/src/schemas/integrations/selectors.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/language-service/src/schemas/integrations/selectors.ts b/src/language-service/src/schemas/integrations/selectors.ts index b02a6423e3..1e96d02f47 100644 --- a/src/language-service/src/schemas/integrations/selectors.ts +++ b/src/language-service/src/schemas/integrations/selectors.ts @@ -316,6 +316,12 @@ export interface DurationSelector { * https://www.home-assistant.io/docs/blueprint/selectors/#duration-selector */ enable_day?: boolean; + + /** + * When true, the duration selector will allow selecting milliseconds. + * https://www.home-assistant.io/docs/blueprint/selectors/#duration-selector + */ + enable_millisecond?: boolean; } | null; } From 6d42462fce0179a07dc093dd4cb61b3138f52ef9 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 5 Oct 2024 11:03:44 +0200 Subject: [PATCH 11/16] Add support for the label selector (#3213) --- .../src/schemas/integrations/selectors.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/language-service/src/schemas/integrations/selectors.ts b/src/language-service/src/schemas/integrations/selectors.ts index 1e96d02f47..f0c2c25afb 100644 --- a/src/language-service/src/schemas/integrations/selectors.ts +++ b/src/language-service/src/schemas/integrations/selectors.ts @@ -33,6 +33,7 @@ export type Selector = | EntitySelector | FloorSelector | IconSelector + | LabelSelector | LocationSelector | MediaSelector | NumberSelector @@ -434,6 +435,20 @@ export interface IconSelector { } | null; } +export interface LabelSelector { + /** + * The label selector shows a label finder that can pick labels. + * https://www.home-assistant.io/docs/blueprint/selectors/#label-selector + */ + label: { + /** + * Allows selecting multiple labels. If set to true, the resulting value of this selector will be a list instead of a single string value + *https://www.home-assistant.io/docs/blueprint/selectors/#label-selector + */ + multiple?: boolean; + } | null; +} + export interface LocationSelector { /** * The icon selector shows an icon picker that allows the user to select an icon. From 83a53970cb2d083f84fed3cded6d8f68e3f36f77 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 5 Oct 2024 11:09:49 +0200 Subject: [PATCH 12/16] Add support for the language selector (#3214) --- .../src/schemas/integrations/selectors.ts | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/language-service/src/schemas/integrations/selectors.ts b/src/language-service/src/schemas/integrations/selectors.ts index f0c2c25afb..b8d75b5a8b 100644 --- a/src/language-service/src/schemas/integrations/selectors.ts +++ b/src/language-service/src/schemas/integrations/selectors.ts @@ -34,6 +34,7 @@ export type Selector = | FloorSelector | IconSelector | LabelSelector + | LanguageSelector | LocationSelector | MediaSelector | NumberSelector @@ -443,12 +444,38 @@ export interface LabelSelector { label: { /** * Allows selecting multiple labels. If set to true, the resulting value of this selector will be a list instead of a single string value - *https://www.home-assistant.io/docs/blueprint/selectors/#label-selector + * https://www.home-assistant.io/docs/blueprint/selectors/#label-selector */ multiple?: boolean; } | null; } +export interface LanguageSelector { + /** + * The language selector allows a user to pick a language from a list of languages. + * https://www.home-assistant.io/docs/blueprint/selectors/#language-selector + */ + language: { + /** + * A list of languages to pick from, this should be RFC 5646 languages codes. + * https://www.home-assistant.io/docs/blueprint/selectors/#language-selector + */ + languages?: string[]; + + /** + * Should the name of the languages be shown in the language of the user, or in the language itself. + * https://www.home-assistant.io/docs/blueprint/selectors/#language-selector + */ + native_name?: boolean; + + /** + * Should the options be sorted by name, if set to true, the order of the provided languages is kept. + * https://www.home-assistant.io/docs/blueprint/selectors/#language-selector + */ + no_sort?: boolean; + } | null; +} + export interface LocationSelector { /** * The icon selector shows an icon picker that allows the user to select an icon. From cafc3a5053e589fc026c7292eb00ce0fdccaf330 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 5 Oct 2024 11:15:01 +0200 Subject: [PATCH 13/16] Add support for the QR Code selector (#3215) --- .../src/schemas/integrations/selectors.ts | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/language-service/src/schemas/integrations/selectors.ts b/src/language-service/src/schemas/integrations/selectors.ts index b8d75b5a8b..64de224236 100644 --- a/src/language-service/src/schemas/integrations/selectors.ts +++ b/src/language-service/src/schemas/integrations/selectors.ts @@ -39,6 +39,7 @@ export type Selector = | MediaSelector | NumberSelector | ObjectSelector + | QRCodeSelector | SelectSelector | TargetSelector | TemplateSelector @@ -550,6 +551,32 @@ export interface ObjectSelector { object: null | Record; } +export interface QRCodeSelector { + /** + * The QR code selector shows a QR code. + * https://www.home-assistant.io/docs/blueprint/selectors/#qr-code-selector + */ + qr_code: { + /** + * The data that should be represented in the QR code. + * https://www.home-assistant.io/docs/blueprint/selectors/#qr-code-selector + */ + data: any; + + /** + * The scale factor to use, this will make the QR code bigger or smaller. + * https://www.home-assistant.io/docs/blueprint/selectors/#qr-code-selector + */ + scale?: PositiveInteger; + + /** + * The error correction level of the QR code, with a higher error correction level the QR code can be scanned even when some pieces are missing. + * https://www.home-assistant.io/docs/blueprint/selectors/#qr-code-selector + */ + error_correction_level?: "low" | "medium" | "quartile" | "high"; + }; +} + export interface SelectSelector { /** * The select selector shows a list of available options from which the user can choose. From 56ae0807b5ea5307f9267cdf53917fa71b101b74 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 5 Oct 2024 11:17:41 +0200 Subject: [PATCH 14/16] Add support for the trigger selector (#3216) --- .../src/schemas/integrations/selectors.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/language-service/src/schemas/integrations/selectors.ts b/src/language-service/src/schemas/integrations/selectors.ts index 64de224236..c15512b420 100644 --- a/src/language-service/src/schemas/integrations/selectors.ts +++ b/src/language-service/src/schemas/integrations/selectors.ts @@ -45,7 +45,8 @@ export type Selector = | TemplateSelector | TextSelector | ThemeSelector - | TimeSelector; + | TimeSelector + | TriggerSelector; export interface ActionSelector { /** @@ -717,3 +718,11 @@ export interface TimeSelector { */ time: null | Record; } + +export interface TriggerSelector { + /** + * The triggers selector allows the user to input one or more triggers. On the user interface, the trigger part of the automation editor is shown. + * https://www.home-assistant.io/docs/blueprint/selectors/#trigger-selector + */ + trigger: null | Record; +} From 2b360b9e2a9721a608b4a6a0336941fb39f0d908 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 5 Oct 2024 11:29:00 +0200 Subject: [PATCH 15/16] Fix MQTT schema for list type based configuration (#3217) --- src/language-service/src/schemas/integrations/core/mqtt.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/language-service/src/schemas/integrations/core/mqtt.ts b/src/language-service/src/schemas/integrations/core/mqtt.ts index 19697ef752..e1ce13b15d 100644 --- a/src/language-service/src/schemas/integrations/core/mqtt.ts +++ b/src/language-service/src/schemas/integrations/core/mqtt.ts @@ -10,7 +10,6 @@ import { DeviceClassesSensor, IncludeList, Integer, - Port, PositiveInteger, StateClassesSensor, Template, @@ -41,7 +40,9 @@ type Availability = { value_template?: Template; }; -export interface Schema { +export type Schema = Item | Item[]; + +interface Item { /** * The mqtt alarm panel platform enables the possibility to control MQTT capable alarm panels. The Alarm icon will change state after receiving a new state from state_topic. * https://www.home-assistant.io/integrations/alarm_control_panel.mqtt/ From c88420131a46eb8ac51377bd0b76cc3f25b19a0b Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 5 Oct 2024 11:41:10 +0200 Subject: [PATCH 16/16] Bump version to v1.43.0 --- package-lock.json | 4 ++-- package.json | 2 +- src/language-service/package-lock.json | 4 ++-- src/language-service/package.json | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index a38e619e7e..e29c1f38ae 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "vscode-home-assistant", - "version": "1.42.0", + "version": "1.43.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "vscode-home-assistant", - "version": "1.42.0", + "version": "1.43.0", "license": "MIT", "dependencies": { "axios": "^1.7.7", diff --git a/package.json b/package.json index f244dba6ab..f5eb9cd454 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "vscode-home-assistant", "displayName": "Home Assistant Config Helper", "description": " Completion for entity-id's in Home Assistant Configurations", - "version": "1.42.0", + "version": "1.43.0", "preview": false, "engines": { "vscode": "^1.45.1" diff --git a/src/language-service/package-lock.json b/src/language-service/package-lock.json index c864db32dc..c63cbbb57f 100644 --- a/src/language-service/package-lock.json +++ b/src/language-service/package-lock.json @@ -1,12 +1,12 @@ { "name": "home-assistant-language-service", - "version": "1.42.0", + "version": "1.43.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "home-assistant-language-service", - "version": "1.42.0", + "version": "1.43.0", "license": "MIT", "dependencies": { "axios": "^1.2.1", diff --git a/src/language-service/package.json b/src/language-service/package.json index 758406dd6a..4a6adec114 100644 --- a/src/language-service/package.json +++ b/src/language-service/package.json @@ -1,6 +1,6 @@ { "name": "home-assistant-language-service", - "version": "1.42.0", + "version": "1.43.0", "description": "Home Assistant Language Service", "source": "src/haLanguageService.ts", "main": "dist/haLanguageService.js",