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

Fix device class in some entities #17

Merged
merged 1 commit into from
Apr 27, 2024
Merged

Fix device class in some entities #17

merged 1 commit into from
Apr 27, 2024

Conversation

elchininet
Copy link
Collaborator

@elchininet elchininet commented Apr 26, 2024

In some entities, like battery ones, the original_device_class property in the more-info ___entry property is not ready when the dialog opens. This was provoking that these entitites were ignored when tried to filter them using their device class.

This pull request reads the original_device_class property with a promise, making sure that it is resolved when it is properly retrieved or its value is null.

Closes: #13

@elchininet elchininet added the fix label Apr 26, 2024
@elchininet
Copy link
Collaborator Author

@Mariusthvdb,
Test this one with your set up and let me know if it fixes the issue or if it creates any unwanted behaviour.

@Mariusthvdb
Copy link
Owner

thank you, and yes, can confirm no more history on battery device_class:

Scherm­afbeelding 2024-04-27 om 12 46 01 Scherm­afbeelding 2024-04-27 om 12 46 12

thanks @elchininet

Copy link
Owner

@Mariusthvdb Mariusthvdb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems fixed, no more history displayed, thank you

@elchininet elchininet merged commit 25bf8b0 into main Apr 27, 2024
@elchininet elchininet deleted the fix_device_class branch April 27, 2024 13:33
@Mariusthvdb
Copy link
Owner

Mariusthvdb commented Apr 27, 2024

thx for the merge, much appreciated!
will this appear in a new release?

@elchininet
Copy link
Collaborator Author

@Mariusthvdb,
I forgot that you didn't have the proper setup to trigger a release. I will let you know when I am ready because you need to un-protect the main branch to allow me to do it. But at some moment I will send you some instructions so you will be able to do it from your side. Are you on a Mac or a Windows device?

@Mariusthvdb
Copy link
Owner

on Mac here, thx

@Mariusthvdb
Copy link
Owner

Mariusthvdb commented Sep 10, 2024

@elchininet
tbh, I am uncertain of the state this PR has, was it released already?
I am still running the local resource, but would love to have this out in the open.
Just let me know how to open the repo up so you can merge it this time?

@elchininet
Copy link
Collaborator Author

Hi @Mariusthvdb,
I have inspected the source code of the latest release and this change is not there.
We need to sync, you unprotect the branch, I push a tag and that should trigger a deployment and a release, and after that you can protect it again.
It would be good to give you the steps to install a package manager, git, and any other front-end tool needed to do this by yourself.
First thing is to install git: https://git-scm.com/download/mac
Try to install it, the easiest path is to install XCode (it comes with Git).

@Mariusthvdb
Copy link
Owner

check please, I've unprotected it

@elchininet
Copy link
Collaborator Author

Hey @Mariusthvdb,
I didn't see your last comment.
Can I try a deployment?
Regards

@Mariusthvdb
Copy link
Owner

Yes I believe so

@elchininet
Copy link
Collaborator Author

Done, you can put the protection again.

@Mariusthvdb
Copy link
Owner

Thank you very much !

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

Successfully merging this pull request may close these issues.

hide by_device_class: battery still shows history
2 participants