* Initial implementation of template tile
Includes settings on phone and watch. Watch settings will be removed in next commit
* Add refresh interval setting to wear app
* Update wear settings layout
* Add interval setting to phone app
* ktlint
* Add example image to the manifest
* Add preview of rendered template in phone settings
* Process review comments
* Use resources for interval strings
* First area implementation for Wear
* Fix import / ktlint
* Area IDs are only nullable in core, not for clients
* A new approach to managing the entity lists
- Change the approach to getting state lists to support any number of lists per type. By nesting a state list inside the list Compose should still be able to update on any changes. To display, loop through the items.
- The main view model now filters the main/source entity list that is used everywhere by supported entities to prevent unusable domains from showing up.
- Fix padding above all entities/settings to make sure that there is still padding even if there are no entities.
- Temporary fix for favorites/tiles: hardcode the lists used. Should be updated to read items dynamically but I couldn't get the rememberSaveable to work in time.
* Filter entities in EntityListView to keep live updates
- Keep the updates in the EntityListView always live by allowing filtering the list in the view itself. Without these changes, selecting any domain from the main screen would give a static list because filtering creates a copy of the original.
- Fix ktlint import ordering
* Listen for registry updates in the main list
- Subscribe to events for registry updates and update any lists. Compose will take care of updating views if necessary, which basically makes this plug and play.
* Load entities for favorites+tiles dynamically
- Load all the entities by domain when setting favorites or tiles, instead of using hardcoded references to specific domains. This is a proper fix for the updated list structure introduced in a previous commit.
- Reuse saving the expanded states of lists from EntityListView because favorites and tiles can now also be any number of headers
* Fix 'All entities' icon filter
* Move names for supported domains
- For determining which tiles are toggleable we already access the implementation directly so remove todos and move names for those domains over to the implementation to keep everything in one place. The main view model will include a simple function to convert the string ID to an actual string.
* Order area/domain lists alphabetically
- Create a new observable list that can be used to determine the order in which to display the list or areas/entities. A mutableMapOf in Kotlin by default respects the insert order but it looks like the mutableStateMapOf doesn't follow that as the items are already inserted alphabetically.
- Allow passing in a list order for the EntityListView to prevent entities from suddenly ending up in a different place on a different screen
* Order entities in area, util object for area
- Order the list of entities displayed in one area alphabetically by their friendly name instead of domain, as it would otherwise still use domains internally to sort but not show them which is not a good experience.
- Create an util object in the common package for getting the area of an entity, as the same code was used both in the device controls and Wear main list.
* Restore domain descriptions to original (plural)
* Add a work profile sensor
The information on whether the work profile is available only seems to
be given by tracking the state of the last received broadcast intent
indication - MANAGED_PROFILE_[UN]AVAILABLE
Thus add a receiver for these intents, and slightly change the architecture
so that the intent can be passed down when the sensor needs to be updated.
I think there's a ineffciency in the architecture - currently all
sensors are asked to update whenever any broadcast the app tracks is
received, regardless of whether than broadcast is relevant to the the
sensor or now - for example all sensors update when battery state changes.
* Revert typo fix to keep this PR focused.
* Pass lint checks
* Initial data flowing.
* Functional login from phone.
* Cleanup data transfer between devices.
* Fix minimal build.
* Address review comments.
* Defaults to actual device when logging in now.
Location hidden when logging into wear device.
* Allow favorite entities to be dragged and dropped for reordering
* Switch favorites to store in DB, fix reordering
* UI updates to reflect draggable items
* Send a json array instead of just a string, add lock domain to settings
* Only add favorites if we have them from the phone
* Remove missing entities, fix initial duplicate load
* Remove redundant work manager bump from phone
* Fix flow of favorites and remaining issues
* Build fixes
* Switch back checked variable
* First color and padding updates
* Add matrial theme
* Remove `setChipDefaults` and ktlint
* Further updates to colors and paddings
* Larger space with unicode "em space"
* Move logout button to settings and adjust padding again
* Update MainView and move entity domain lists to MainViewModel
* Animated TimeText
* Fix merge issues
* Process review comment and hide empty domains in all entities view
* Put in quick fix for showing lock state in ToggleChip
* Add non-functional example of favorites tile
* Load real scene entities into the Tile
* Make the tile buttons actionable
* Add icons of the entities
* Add tile preview image
* Also support fewer than 7 entities
* Cleanup and pass ktlint formatting
* Add support for lock domain
* Pass along state to HomePresenter
* Add lock to toggleDomains
* Revert "Merge branch 'home-assistant-master' into wear-os-add-lock"
This reverts commit b446006c00, reversing
changes made to a65b4e03e8.
* Move database to common module
* Fix lint
* Better kapt error reporting
* Alias common module's resources into app
* Move base sensor receiver & worker to common module
* Add sensor receiver & worker to wear module
* Schedule sensors Worker on app start up
* Export the SensorReceiver in the wear manifest
* Upgrade base and wear sensors Receivers and Workers to Hilt + hoist updateSensors to sensors Receiver base + introduce base location manager + fix minimal sensor stubs
* Re-add important battery sensor info
* Remove unused imports
* Listen for battery updates in wear app
* Listen for screen updates in wear app
* Fix ktlint
* Add sensors to wear OS on home screen
* Stop listening to screens and power save mode
The sensor isn't added yet
* Remove commented code due to absent sensors... for now. Mwahahaha!
* Remove unused import
* Begin work on editing favorites from the phone
* Get list of entities and show alongside favorites
* Fix minimal build
* Fix minimal build again
* Another fix attempt
* Lint
* Send and save favorites from phone to wear
* Add TopAppBar, make row clickable, minor clean up
* Add landing view, navigation and major cleanup
* Add some previews, fix missing entities, more refactoring
* Remove unused method
* Remove TODOs
* Switch to hilt
* Review comments: Fix favorite deselection, update favorits in onResume
* Review comment: remove unused code
* Review comments
* More review comments
* Correct spelling
* Apply code review to PhoneSettingListener
* Remove unneeded thread calls
* Add non-functional example of favorites tile
* Load real scene entities into the Tile
* Make the tile buttons actionable
* Add icons of the entities
* Add tile preview image
* Also support fewer than 7 entities
* Cleanup and pass ktlint formatting
* Add settings page for tile shortcuts
* Use new settings in Tile
* Make the tile update when the settings are changed
* Support all types of entities in TileActionActivity
* Rename tile and process comments
* ktlint
* Update layout of settings a bit
* Use a string resource like a normal person
* Remove remaining SetTitle instances
* Process review comments and add data class to store entity strings
* Process review comments
* tiny ktlint fix
* Fix broken previews
* Fix white lines after merge
* Move tile refresh to compose function.
* Fix crash when missing friendly name or icon.
* ktlint...
Co-authored-by: Justin Bassett <bassett.justint@gmail.com>
* Better state hoisting.
* Broke down compose items and removed dependant state.
* Functional minus favorites....
* Favorites working, not my best solution.
* Breaking more stuff down.
* ktlint.
* Initial setup of WebSockets!
* Got some good sets of table tennis going.
* Move to a more kotlin friendly way to lock.
* Functional get config call.
* Remove testing function.
* Linting.
* Migrate get config calls to websockets!
* Working retries.
* Get services now as websocket request.
* Remove unused service call via api.
* Fix issue with widget not prompting the correct items.
* Migrate to websocket get states.
* ktlint.
* Review Comments.
* Add settings and favorites for wear
* Use proper variable for navigation
* Refactoring to remove clutter from HomeActivity
* Always start set favorites at the top
* Review comments
* Correct merge mistake
* Add rotary input on set favorites screen
* Convert wear home activity to compose
* Bump compose libraries and make UI consistent
* UI fixes based on review comments
* Use chip overflow and max lines instead of take
* Bump activity compose dependency in wear
* Clean up old files
* Remove more unused files
* Pass entities into composable and use rememberSaveable for the lists
* Move getEntities to ViewModel for recomposition
* Restore onViewReady changes
* Add a loading screen while waiting on viewmodel
* Add Wear OS Settings section
* Fix minimal build
* Fix PR build and hide category by default
* Mention Wear OS app is only offered as a beta in case user is unable to install
* Review comments
* Initial proof-of-concept: sharing Session over data layer
* Add initial onboarding and login flow
In onboarding, the home assistant urls are received from connected devices. If the user clicks on it, the authentication flow starts.
The user can alter the login details and proceed to login.
The authentication uses the "auth/login_flow" api, instead of the normal authentication api, since there is no support for webview on wear os.
* Clean up wear and app communication
Clean up
* Add proof of authentication on home. And add logout button on home
* Update onboarding list
* Add loading views and error messages
* Move startup logic to HomeActivity to hopefully save some resources
* Add manual setup option and improve UI
* Cleanup
* Passing ktLintCheck
* Passing ktLintCheck after rebase
* Fix building after build.gradle changes during rebase
* Process review comments
Remove multiple product flavors
Remove unnecessary log
Replace margin with additional header
* Update to use latest Android Gradle Plugin.
This includes updating to use Java 11.
Also bump a test dep.
* Bump Dagger
* Naming of task for JDK Setup.
* Disable test.... scopes stink for testing.
* ktlint.