Skip to content

Commit

Permalink
Add support for the QR Code selector (#3215)
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck authored Oct 5, 2024
1 parent 83a5397 commit cafc3a5
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/language-service/src/schemas/integrations/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export type Selector =
| MediaSelector
| NumberSelector
| ObjectSelector
| QRCodeSelector
| SelectSelector
| TargetSelector
| TemplateSelector
Expand Down Expand Up @@ -550,6 +551,32 @@ export interface ObjectSelector {
object: null | Record<string, never>;
}

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.
Expand Down

0 comments on commit cafc3a5

Please sign in to comment.