From 422af5a870f12b7e9a0eb9c8bce14e882bf4085a Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Mon, 3 Apr 2023 10:45:47 +0200 Subject: [PATCH] Document the constant selector (#26844) --- source/_docs/blueprint/selectors.markdown | 26 +++++++++++++++--- .../images/blueprints/selector-constant.png | Bin 0 -> 4173 bytes 2 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 source/images/blueprints/selector-constant.png diff --git a/source/_docs/blueprint/selectors.markdown b/source/_docs/blueprint/selectors.markdown index f81b5e432a3..a5de950c420 100644 --- a/source/_docs/blueprint/selectors.markdown +++ b/source/_docs/blueprint/selectors.markdown @@ -22,6 +22,7 @@ The following selectors are currently available: - [Boolean selector](#boolean-selector) - [Color temperature selector](#color-temperature-selector) - [Config entry selector](#config-entry-selector) +- [Constant selector](#constant-selector) - [Date selector](#date-selector) - [Date & time selector](#date--time-selector) - [Device selector](#device-selector) @@ -241,12 +242,11 @@ For example: `next_dawn`. ## Boolean selector The boolean selector shows a toggle that allows the user to turn on or off -the selected option. The input's value will contain the boolean value of that -toggle as a boolean value, being `true` or `false`. +the selected option. ![Screenshot of a boolean selector](/images/blueprints/selector-boolean.png) -The boolean selector can be incredibly useful for adding feature switches +The boolean selector is suitable for adding feature switches to, for example, blueprints. This selector does not have any other options; therefore, it only has its key. @@ -255,7 +255,7 @@ This selector does not have any other options; therefore, it only has its key. boolean: ``` -The output of this selector is `true` when the toggle was on, `false` otherwise. +The output of this selector is `true` when the toggle is on, `false` otherwise. ## Color temperature selector @@ -305,6 +305,24 @@ integration: The output of this selector is the entry ID of the config entry, for example, `6b68b250388cbe0d620c92dd3acc93ec`. +## Constant selector + +The constant selector shows a toggle that allows the user to enable the selected option. +This is similar to the [boolean selector](#boolean-selector), the difference +is that the constant selector has no value when it's not enabled. + +![Screenshot of a constant selector](/images/blueprints/selector-constant.png) + +The selector's value must be configured, and optionally, a label. + +```yaml +boolean: + value: true + label: Enabled +``` + +The output of this selector is the configured value when the toggle is on, it has not output otherwise. + ## Date selector The date selector shows a date input that allows the user to specify a date. diff --git a/source/images/blueprints/selector-constant.png b/source/images/blueprints/selector-constant.png new file mode 100644 index 0000000000000000000000000000000000000000..261dfb061f20964cedf6b70da10db1c55a00f813 GIT binary patch literal 4173 zcmd6qXHb({x5uNX7>>ZPfaeIvQ4|COq=_g+P()fNA)!P-L24iYA+$hp&?6jC5e!9w zfTFYn2uKM%BE5?eAb}7#^b!JrfRuzc-kCddKirvnKfUvQ*!#cNTJxX1_I_rbJ-=r* zAX8D1Ga>*0K-BE+Z94$qV3uI*aP){^E*3Ls6Uc#JJ5ysoNuTtBAUNc0WMu>Zl)d_8 z@4;a~3=F*M6bt}}HUAt3+K~kh0RZuT%x)Xmhr6;E;(?N$?(J)`ao$CJ_0q*bezBI8 z$L=)~PcZ9ZEZV!^kPby4D!~GI)JU{b^r-j!N2ywsEhBPIaYvs3HxB*&hlaj}j`QD@ zoe+6s{?OaXXATLc=cZdv7<S+G1t`6qw>x%#i`u(l2yd12ksEAN3BUSGo6l8Gm6F&>qzv>+T049Ks z6$F8v`bx8jKtG4ea{`ZBR|*L#gjM?+f>ep}A!~tzKmK1_MyrPafIk(E{=CA~Lro_I zlJ!TpV3W@$|J^3{uBX48zP!ad%3v_eEi8g991u+Gy}_Lir#F~9;A!&n zFAnj$!)1uv7yHvWB~E2$&u({D+!4MU9!po0Lno5L=v zdvu5V`May~z1#FkSf!7}Q%Myj>7#4+${4d1jcR{;4M%Wzm}-H#BcI4=}z+woL)0?^G%{p zaLr>1fm#w1)66eD)5S^F*KGd%c&{@2#V@%k&KXJh^x-h#kC@BegXhpeDaJu^c>{6~ zXAL!Inl|zo!8x+WnzgM_LFlXxaQ0jr!e?It6Ir?LDjf+g?>{uWR}?!1dfHrbZ1c+l zmTD&HGB`UaGoK)5TPJUXZk9$?>(yp7+-y~gqq3p2FNQ9}`WVj)Rv;9mmG;H&1sk_0 z$!$5zEy;^-3jK8U5;Qu)$#m`!?;sV=0wP_04eKm+n-p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