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

Shortcuts entity #1471

Merged
merged 4 commits into from Apr 1, 2021
Merged

Conversation

dshokouhi
Copy link
Member

@dshokouhi dshokouhi commented Apr 1, 2021

Summary

Hopefully this branch is ok, I see a couple commits from the previous PR but the changes depicted are only from the branch as i have rebased the branch off master.

This now adds a shortcut type list preference so users can pick between Lovelace (default) and an Entity. For the Entity we grab a list of all entities and let the user select the one they want. We will add in the proper logic to switch between entity and lovelace type along with providing the proper data in shortcut.

This also fixes a bug that I found where the Pin Shortcut is enabled but non-functional as the entire setOnPreferenceClickListener was incorrectly wrapped in a condition that would only succeed if the variables were met. Now we do one check in onResume and let the rest of the preference listeners update the field as expected.

Screenshots

image

image

image

Link to pull request in Documentation repository

Documentation: home-assistant/companion.home-assistant#485

Any other notes

@JBassett JBassett merged commit 70d12ce into home-assistant:master Apr 1, 2021
@dshokouhi dshokouhi deleted the shortcuts_entity branch April 1, 2021 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants