Has anyone been able to use or get working the Constant selector?
I havenât used, but found thisâŚ
Hi James, thanks for responding 
I to have also seen this and have tried it but canât seem to get it working. HA may not be very clear in this documentation as we have 2 different example, or it is just me not understanding it. I am sure it will work once we know the correct way to set this up. The closest I could get was to insert a default but there was no tick box.
Release notes code
example:
name: Constant selector example
default: []
selector:
constant:
label: Enabled
value: true
The code that they (HA) have provided in selectors⌠I have had no luck.
boolean:
value: true
label: Enabled
Maybe someone will read this that do the documentation and fix it up for us or just let us know what I am doing wrong.
Iâm not sure what to expect, but I pasted the sample code in and it didnât error. Not sure what it is supposed to do, but it saves and was available as an input that didnât do anything.
What are we expecting this to actually do? I mean the selector sets the only option, it really isnât an !input at all, is it? Just add a variable that holds your âconstantâ.
There was an error in the VSCode yaml parser but that doesnât always mean anything. There should be an issue added to Issues ¡ keesschollaart81/vscode-home-assistant ¡ GitHub so someone can fix that there.

This change is only a month old or so and the VScode parser usually lags the HA implementation and these things pop up until they are fixed.
Yep, it has never work from day 1⌠or I couldnât ever get it working. But it must work as it was a new feature right. Documentation is confusing and I could never get the tick box so it would do something.
I did post and issue to GitHub but got nothing.
Maybe someone will fix it or jump in and let us know what we are doing wrong.
Probably just be used in a condition. That is what I was thinking to use it for.
It doesnât error. It seems to present a constant. Itâs just conceived weirdly. IE there is no constant âentitiesâ that you can select, you generate the constant in the selector. You are able to turn it on and off outside of that, but off means blank, on means the constant word assigned. Plus the 'selector doesnât appear to include the ability to turn it on or off. In no way is any of that a âselectorâ. I can do that all easily as a variable.
I agree I donât understand it, but I donât think itâs broken.
I would expect a constant be something set-up outside of the selector, like a constant helper, and the selector be the ability to pick one of the created constants. My thought is itâs missing that, but I really donât know what the plan was here.
The thing we are missing is the tick option and I dont think there should have to be a default if you donât need one. My understanding is, it only provides one value you set. So if someone tick the box then it can be âtrueâ or any wording you put in the value. Then you can use that in a condition. I am not 100% sure on this as we canât test it. My gut feeling is, they (HA) uploaded an old code file and havenât realised it.
@emontnemery and @piitaya
Could you please advise us on the above constant selector.
Thank you
Blacky 
I figured out more about this âconstantâ selector.
It works as advertised when used as a field in a script. That must of been the intended use. However it still appears broken when used in a BPâŚ
In case anyone might come across this thread laterâwhile I agree that the constant syntax covered in the official docs is pretty vague slash broken, Iâve had some success through using the constant syntax thatâs covered in the release notes from when this feature was introduced:
example:
name: Constant selector example
selector:
constant:
label: Enabled
value: true
What did you gain by using it? Can the BP user affect it in any way when creating a new BP?
I was able to get it to show up, but it was better replaced by a variable because the BP user could see it but not select anything. This is why the question if itâs a selector or not.
If there were perhaps a constant helper entity created, then use this selector to select one, that would work. This thing is a puzzle indeed.
Hi Ashley, I have tryed again today on HA 2023.6.2 and still not working here and I had to put in a default. Without the default the automation disappears from section.
example:
name: Constant selector example
default: []
selector:
constant:
label: Enabled
value: true
And I get this
@Blacky @Sir_Goodenough I perhaps should have clarified this earlier, but it so happens that Iâve only messed about with the constant selector in scriptsâwhen Iâve tried constant in a script, it appears to work as the release notes described when the feature was introduced.
My bad if I may have led you on a bit of a goose chase if it so happens that constant might be broken in blueprintsâwhich sounds like it may be the case? Sorry about that.
Not everyone agreesâŚ
Also the release notes specifically state this was intended for blueprints, scripts are not mentioned. I agree it works slightly better in a Script selector, but even then a variable would be almost as useful.
Thanks Ashley 
I agree James, I donât know why you would release something that doesnât work. I will tag the ones who created it again encase they are unaware it is broken or they need to fix up any documentation so we donât waste time trying to get it working.
@emontnemery and @piitaya


