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

Remove lock variables from Cover device state attributes #108

Merged
merged 2 commits into from
Jul 6, 2020
Merged

Remove lock variables from Cover device state attributes #108

merged 2 commits into from
Jul 6, 2020

Conversation

tetienne
Copy link
Collaborator

@tetienne tetienne commented Jul 6, 2020

Some _lock_xxx variables was only used fo within device_state_attributes which is IMO useless. Removing them, we once again ease the code with useless boilerplate.

@tetienne tetienne marked this pull request as draft July 6, 2020 10:08
@tetienne tetienne marked this pull request as ready for review July 6, 2020 10:08
@vlebourl vlebourl added enhancement New feature or request platform: cover labels Jul 6, 2020
@iMicknl iMicknl requested review from iMicknl and vlebourl and removed request for iMicknl July 6, 2020 10:20
@iMicknl
Copy link
Owner

iMicknl commented Jul 6, 2020

@tetienne I will have a look later today, this is something I will need to test a bit more. I am not 100% sure what the previous code did, since this is coming from the original component.

@tetienne tetienne requested a review from iMicknl July 6, 2020 10:47
@tetienne
Copy link
Collaborator Author

tetienne commented Jul 6, 2020

@iMicknl Normally the data I removed are not used in the cover behavior. They are here only to be used as HA attributes where you can put what you want.

@vlebourl
Copy link
Collaborator

vlebourl commented Jul 6, 2020

I don't have covers and can't really appreciate those changes, so I put my faith in you :)

@iMicknl
Copy link
Owner

iMicknl commented Jul 6, 2020

@tetienne true, but I am not sure if those value are used by automations of people using the current component. I have never used those values, thus I would need to see if this is something where people can depend on.

However, I am up for making the cover platform simpler, since there is still some legacy inside.

@tetienne
Copy link
Collaborator Author

tetienne commented Jul 6, 2020

I don't see any reason to use these weird variables. It's not something familiar within HA.

Copy link
Owner

@iMicknl iMicknl left a comment

Choose a reason for hiding this comment

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

Good to have the cover component simplified. If people use the _lock_level or calculated _lock_timer, we will gather their feedback at some point.

@iMicknl iMicknl changed the title Remove some useless lock variables Remove lock variables from Cover device state attributes Jul 6, 2020
@iMicknl iMicknl merged commit eefe27c into iMicknl:master Jul 6, 2020
@tetienne tetienne deleted the RemoveUselessLock branch July 6, 2020 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request platform: cover
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants