Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2024.06 update has damaged some functions of custom sentences #2212

Open
mitrokun opened this issue Jun 6, 2024 · 3 comments
Open

2024.06 update has damaged some functions of custom sentences #2212

mitrokun opened this issue Jun 6, 2024 · 3 comments
Assignees

Comments

@mitrokun
Copy link
Contributor

mitrokun commented Jun 6, 2024

After the 2024.06 update, my custom sentences stopped accepting the alias of the area.
And in intent_script, the area_name(area) construction began to give the value None.

Use this code (simple sentence and a intent script ) to check if you have same problem.

  tempstat:
    data:
      - sentences:
          - "Tell me the temperature in the {area}"

tempstat:
  action:
    []
  speech:
    text: "temperature in the {{ area_name(area) }} {{  states.sensor|selectattr('attributes.device_class', 'eq', 'temperature')|selectattr('entity_id', 'in', area_entities(area))|map(attribute='state')|min|int  }}" 

aliases continue to work with a built-in intents

@synesthesiam
Copy link
Contributor

Area is now passed in by name instead of id.

@mitrokun
Copy link
Contributor Author

mitrokun commented Jun 6, 2024

Thanks for the information.
Replacing {{area_name(area) }} with {{ area }} allowed to get the value names of rooms. But the system reports an error when using aliases of area in the request.

Built-in intents do not have this problem and response returns the required form (I use them for case forms of the name).

Which expression format should be used to return this functionality to custom sentences?

//added an explanation. As Michael pointed out, the area_entities(area) in the filter also returns none, which breaks the answer. We don't often use those constructions in the response of built-in sentences, so they are not affected by this problem.

@synesthesiam
Copy link
Contributor

Ah, this is a deeper problem that needs to be addressed. The area_id template function doesn't handle aliases as the moment, but I think it should. I will be creating a PR for this soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants