Is there a "Legacy Syntax" on entity domain for selectors? (add filter:)

I was going in to tweak something else. I haven’t really messed with my yaml files in a while and noticed there were a few places where there is a note about a deprecated features in some of my blueprints and scripts. They’re all where it’s selecting an entity domain for selectors in the UI. My google skills failed me and I went back like 9 months and can’t find a breaking change there.

I’m trying to figure out how to fix it. I could just remove it but I like it showing only the wanted entities and want to fix it before it is removed.

There was a change to the syntax. Edit your yaml.

Thanks! Got it all cleaned up.

1 Like

It’s not immediately obvious and it’s not spelt out anywhere: the change one needs to make is simply to insert a “filter” key between “entity” and “domain”:

selector:
  entity:
    filter:   # <<< here
      domain: hue

It was made here: Add filter options to entity and device selectors by piitaya · Pull Request #15302 · home-assistant/frontend · GitHub

2 years ago this happened. Why are you pinging me about it now. I updated the docs for this 2 years ago and fixed the internal HA Blueprint samples in seperate PR’s.
I remember what happened.

Because 2 years later this forum thread is the closest thing to a migration guide I could find via search (thanks!), yet even here or in the links you posted it doesn’t say explicitly what needs to be changed…

Well then. Thanks for helping out the 0.1% of the installed base running 2YO versions and seeing this issue.

You don’t need to run a 2 year old version to encounter this. There are loads of dated YAMLs all over the web, you know.

Since it’s not an error, if it’s there, no one notices. It’s not really deprecated either, it’s just old valid syntax at this point.

Regardless, I meant it when I thanked you for fixing this.

Thanks for adding this useful bit of information too, as here’s how this looks in VSCode (src):

(Edit: I see that my initial comment was somehow made in reply to your post – for which I apologise.)