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

Service recorder.purge_entities don't update title in UI automation #20711

Closed
4 tasks done
WorldOfGZ opened this issue May 3, 2024 · 3 comments · Fixed by #20733
Closed
4 tasks done

Service recorder.purge_entities don't update title in UI automation #20711

WorldOfGZ opened this issue May 3, 2024 · 3 comments · Fixed by #20733

Comments

@WorldOfGZ
Copy link

Checklist

  • I have updated to the latest available Home Assistant version.
  • I have cleared the cache of my browser.
  • I have tried a different browser to see if it is related to my browser.
  • I have tried reproducing the issue in safe mode to rule out problems with unsupported custom resources.

Describe the issue you are experiencing

Hello

I think is issue is related to PR home-assistant/core#110066 which seems removed Target

I saw it on an automation I used to purge daily a very noisy sensor.
My automation at beginning was like that :

service: recorder.purge_entities
data:
  keep_days: 1
target:
  entity_id:
    - sensor.creality_cr10_v2_electric_consumption_w
    - sensor.creality_cr10_v2_last_seen
enabled: true

As you can see, title is ok, but target doens't appear because target was removed.
image

So, I tried to modify the automation to respect the breaking change with this one :

service: recorder.purge_entities
metadata: {}
data:
  keep_days: 0
  entity_id:
    - sensor.creality_cr10_v2_last_seen
    - sensor.creality_cr10_v2_electric_consumption_w

image


By the way I just would also add something about this modification. Labels was just introduced some weeks ago, and could be selected in "Target" which is now removed of this service.
I was with the idea of simplifying my automations with use this labels as target on recorder.purge_entities and mark some noisy entities as for example "Purge 1 day", "Purge 7 days", ... But now it will no longer possible

Describe the behavior you expected

Normally, the title is personalized to the target/entity used

Steps to reproduce the issue

  1. Create an automation with UI
  2. Add action recorder.purge_entities
  3. Add at least an entity

What version of Home Assistant Core has the issue?

core-2024.5.0

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

Google Chrome 124.0.6367.119

Which operating system are you using to run this browser?

Windows 10

State of relevant entities

No response

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

@WorldOfGZ WorldOfGZ changed the title Service recorder.purge_entities title seems in trouble with title in UI automation Service recorder.purge_entities don't update title in UI automation May 3, 2024
@karwosts
Copy link
Contributor

karwosts commented May 3, 2024

By the way I just would also add something about this modification. Labels was just introduced some weeks ago, and could be selected in "Target" which is now removed of this service.
I was with the idea of simplifying my automations with use this labels as target on recorder.purge_entities and mark some noisy entities as for example "Purge 1 day", "Purge 7 days", ... But now it will no longer possible

Just want to point out that this was never possible. Prior to the removal of target selector, if you had selected a label and clicked purge, it would have erased your entire database. That was the reason it was removed.

@WorldOfGZ
Copy link
Author

Sorry, I probably expressed myself wrong, English is not my native language.
Before release 2024.5.0 I used Target to select entities, and purge only entities necessary.
When the labels was released I saw we can call it in target and a saw an opportunity to label directly an entity with "Purge 1 day", "Purge 7 days", ... and don't come back to automation to add entities. But I hadn't done it yet..

Today I was in the way to try it and it's appear something change, then I found the PR to understand.
So I rewrite my automation, and see the problem with title, this is the reason of this issue.

I fully understand reasons of the PR, and fully agree with the problem resolution. But I think (probably for myself) that labels would have been a very good use case, if it could work.

@karwosts
Copy link
Contributor

karwosts commented May 3, 2024

Yes perhaps someday someone can extend the service to fully support target selector.

The title issue is possibly a duplicate of #20496

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

Successfully merging a pull request may close this issue.

2 participants