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
Editing wear favorites from the phone #1908
Editing wear favorites from the phone #1908
Conversation
b5ea686
to
fdcf3ab
Compare
81102c2
to
5433e49
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be rebased/merged so you can do you dependency injection with Hilt now.
5433e49
to
5f58c8f
Compare
Great work! Awesome that we're starting to be able to change the wear app settings from the phone :)
|
wear/src/main/java/io/homeassistant/companion/android/phone/PhoneSettingsListener.kt
Outdated
Show resolved
Hide resolved
Thank you I appreciate that! This one was a bit of a challenge to get all the pieces working together but luckily a lot of the foundation was already there from your previous PR for sending the HA instance over :)
I could do that but then it might make sense to show a category saying these are Input Booleans or what not. I opted for entity ID so users know which entity it is. Honestly I figured we could redo the Whatever we do here though should probably be reusable so maybe making the Row a better compose element makes the most sense. We have a few places to add these to like QS tiles and Shortcuts for example. But neither of those were updated to compose yet.
So updating Wear when the app is open is something I couldn't get to work when I submitted this. However when the app was re-opened it always pulled in the latest favorites which were updated from the phone.
I think a broadcast might be helpful here I'll have to look into that. 🤔, honestly didn't think about it since I felt the most important parts were already done 😂 |
That makes a lot of sense indeed. I suppose we can reuse that row composable as you say. Maybe we can add a main label with the friendly name (if it has one) and a secondary label with the entity ID? Then the next question is do you want the icon on the left and the checkbox on the right? Or the other way around? Or both on one side? :P
Interesting! Somehow that doesn't work for me. I really need to fully close the app with the back gesture, instead of just the home button...
Oh that is definitely true! This is more a finishing touch on the user experience :) |
ok that makes sense then because currently favorites only update in
Yea lots of considerations here, we could also try to make our own chip to help match the wear UI 😂 |
app/src/full/java/io/homeassistant/companion/android/settings/views/SettingsWearHomeView.kt
Outdated
Show resolved
Hide resolved
That would be a fun one haha 😁 But would indeed be nice to have a common design element |
...src/full/java/io/homeassistant/companion/android/settings/views/SettingsWearFavoritesView.kt
Outdated
Show resolved
Hide resolved
Ok fixed the issue regarding favorites duplicating. I also added some code to update the favorite entities upon resuming the app. It was a bit difficult to try to get a receiver setup and its actually not correct. What we should do is save the entries to the DB and use a |
a1361b4
to
f6bcb18
Compare
app/src/full/java/io/homeassistant/companion/android/settings/SettingsWearViewModel.kt
Outdated
Show resolved
Hide resolved
app/src/full/java/io/homeassistant/companion/android/settings/SettingsWearViewModel.kt
Outdated
Show resolved
Hide resolved
app/src/full/java/io/homeassistant/companion/android/settings/SettingsWearViewModel.kt
Outdated
Show resolved
Hide resolved
app/src/full/java/io/homeassistant/companion/android/settings/SettingsWearViewModel.kt
Outdated
Show resolved
Hide resolved
app/src/full/java/io/homeassistant/companion/android/settings/SettingsWearViewModel.kt
Outdated
Show resolved
Hide resolved
app/src/full/java/io/homeassistant/companion/android/settings/views/SettingsWearHomeView.kt
Outdated
Show resolved
Hide resolved
...src/full/java/io/homeassistant/companion/android/settings/views/SettingsWearFavoritesView.kt
Outdated
Show resolved
Hide resolved
app/src/full/java/io/homeassistant/companion/android/settings/views/SettingsWearLandingView.kt
Outdated
Show resolved
Hide resolved
app/src/full/java/io/homeassistant/companion/android/settings/SettingsWearViewModel.kt
Outdated
Show resolved
Hide resolved
app/src/full/java/io/homeassistant/companion/android/settings/views/SettingsWearMainView.kt
Outdated
Show resolved
Hide resolved
Hope I addressed them all appropriately :) |
Summary
There is a lot going on here but I wanted to get the working code submitted early in case it can help anyone else looking to do something similar. Also a good time to think about the layout of phone settings overall.
Screenshots
Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#613
Any other notes
Got a lot to do and we need to think about the design. Such as when a user has more than one wearable. How to access each of the settings etc...