* Add location history (location, trigger, result)
- Initial setup saving data, no UI, cleanup or preferences yet
* On/off setting, limit history size and basic UI
- Add a on/off setting for location history (default on)
- Limit the history size to 48 hours, any older entries will be deleted during regular sensor updates
- Add a basic UI for location history based on paging considering the possible data size with multiserver/high accuracy. The list looks good and shows status at a glance, detail view still needs work.
* Finish expanded UI
- Make the expanded UI nicer and show relevant data, buttons for opening the location in a maps app and sharing log data
- Add empty states for location history
* Filter by state, improve list speed
- Add option to filter by state
- Simplify Room configuration and sort by indexed ID to improve list loading speed
* Remove duplicate source
* Fix minimal
* Split sent into sent and failed to send
* [WIP] Prepare camera snapshot tile
* Deduplicate refresh views
* Get/save tile config in the database
* Deduplicate haptic click, add to camera refresh
* [WIP] Camera tile settings UI
- Create UI to set camera tile settings
- Reuse shortcut tile settings activity as a general tile settings activity
* Rename camera snapshot tile to camera tile
* Cleanup: camera entities selection, empty state, preview image
- On initial load also create a list of camera entities to make it possible to select them without showing up elsewhere in the app
- Add text to empty state instructing the user to set a camera
- Update tile preview images
* Fix logged out state on missing tile config
* Force tile update on login
* Scale bitmap to fit inside screen size
- Scale the received image to a bitmap that does not exceed the screen size to ensure timely refreshes and prevent parcels that are too big
* [WIP] Widget tap action: toggle entity
* Add feedback on press and failure
* Share code for pressing on entities
* Align cover press action
- Toggle will stop if possible when opening/closing if supported so prefer toggle instead of open/close
* Toggle by default if supported
- Set the default tap action for supported entities to toggle instead of refresh
* Update widget description
* Show measurement unit in Wear OS complication
* Extend existing `friendlyState` method
* Make showing unit configurable (defaulting to false)
* Feedback fixes
* Add icon dialog based on Jetpack Compose
TODO
* Migrate to new icon dialog
* Migrate old database
* Don't wrap with drawablecompat
* Rebase fixes and updates
- Fix and update database migration
- Fix dependencies
- Fix shortcut icons
- Fix ComposeView in AlertDialog not working by switching implementation to DialogFragment
- Fix icons that no longer exist
- ktlint
* Visual compatibility
- Automotive asset
- Handle icon ids in shortcuts to prevent users losing icons when updating shortcuts
- Add padding, color filter to shortcut icons to keep icons consistent with older icons
- Increase button widget icon padding to keep sizing consistent
- Add tip to dialog about searching in non-English languages
* Fix line endings
---------
Co-authored-by: Tiger Oakes <contact@tigeroakes.com>
* Add ComplicationType.LONG_TEXT support, friendly state
- Makes it possible for watch faces to request a long text complication
- Use the friendly state to support translated states and dates
* Add show title option
- Allows hiding the title of a complication in case it doesn't look right
* Implement/fix reading state from database
- When a entity ID is provided in the configuration request, load data for that complication from the database to allow easy reconfiguration
- Provide more appropriate error messages when complication isn't configured / the entity doesn't exist
* ktlint
* Get and cache user information
- Add function to get information about the current user
- Cache user information alongside server in database
* Replace/prevent admin only calls
* Multiserver foundation
- A foundation to build multiserver support on. Not ready for general use.
* Update new vehicle support
* Rebase fixes
* Multiserver settings
- Show settings for the correct server when editing server settings from the settings
* Bind session to device/install
- Save an install id with the app install to make sure that it isn't re-used on another device causing issues
* Add migration
- Migrate server info from shared preferences to the database after database migration and clean up
- Remove unused url shared preferences
- Read/save server version from/to database
* Fix auth error when session is refreshed
* Show server name instead of URL
- Read the server name when getting the config, and save it to the database
- Allow the user to override the server name in the app's settings
* Multiserver notifications
- Make notifications aware of which server sent the notification
- Show server name in notification if more than 1 server is added to the app
- Use the server-specific repositories when calling webhooks/authenticating/etc
* Handle multiserver in websocket worker
- Copy the settings database row to the new server ID to allow for server-level settings (websocket) while keeping the original for app-level settings (sensor update frequency), and handle this in onboarding
- Make the websocket worker check in on all servers and open/close connections where required
- Add the webhook_id to websocket notifications to link them to servers
- Update ServerManager servers to defaultServers because I'm using the same filter everywhere
* Migrate shared preferences
- Move server-specific device name to Server and secret key to ServerConnectionInfo
- Add a server ID key to the remaining shared preferences and migrate existing values
* Add option to delete server from settings
- Allow deleting servers directly from the app's settings, because you might not be able to do so from the frontend.
* WebView switching and active server management
- Allow switching which server is considered 'active' and used for the webview when loading
- On auth errors remove the server instead of removing the URLs (?)
- When getting external auth consider that the server might just have been removed (possible race condition from frontend which frequently causes 1 unauthorized connection when logging out)
- Fetch config after adding a new server to fill in name and version before first use
* Sync registrations and blocking load
- When starting the app, sync all registrations
- Remove Wear state with server but new registration required
- When receiving a new push token, update all registrations
- Do a blocking load for getting the servers because otherwise the app might think it's not registered when running in the background
* Use StateFlow for the server list
- Don't manually refresh but use a StateFlow to get updates pushed when the list of servers changes
- Make settings use unique server keys to prevent constant remove/re-add
* Sensor updates and sync with multiple servers
- Send sensor updates to all servers and sync changes to the app. Sensors are shared across all servers the app is connected to so changing enabled state on one server will update it for all servers.
- Don't update sensor enabled state for location tracking directly from onboarding, this should be done in the result.
- Remove unused SensorWithSettings class
* Send NFC tag scans to all servers
* QS tiles server selection
- Listen to updates for a specific server
- Allow selecting server if there is more than one
* Shortcuts server selection
- Allow selecting server if there is more than one
- Extract OutlinedButton with DropdownMenu for server selection to a standalone Composable
- Update QS tiles to not automatically reset server ID when server no longer exists, align with shortcuts
* Fix revoked sessions + crashing app
- When a session is revoked update the session object to reflect it
- Fix app crashes on revoked sessions because of race conditions with the AlertDialog causing window active/inactive at the same time as finishing it
* Extra server onboarding tweaks
- Skip welcome and location
- Save/fix notification preference for minimal version
* Fix sensor state type conversion errors for new servers
- If the state is removed but the type isn't, this can result in unwanted conversions throwing errors so remove the state type as well when copying a sensor
* Matter multiserver
- Request specific server ID in Matter functions
- Add server selection to shared Matter device flow
* Android Auto multiserver
- Allow switching server in Android Auto. Defaults to active server, note that it doesn't change the default but only changes it in AA.
* Widgets server selection
- Add server selection to all widgets and update handling to use the selected server
* Clean up TODOs out of scope
* Device controls multiserver
- Subscribe to updates for each server that controls are added for
- Allow managing lock screen enabled controls for each server
* Don't try to register sensors when finishing
- Don't try to do a sensor update when finishing, as this may cause unintended use of resources we're trying to clean up (when deleting a server)
* Server-level zones and location tracking
- Keep track of which server a zone belongs to for location tracking, and send updates only to that server
- Add server name to zone selection setting
* Merge fix
* Show 'Activate Server' any time there are multiple servers
- If the user is looking for the option to go to their server why hide it if it is already used, making them go back twice?
* More consistent strings
* Improve add server feedback in settings
- Preserve the activate server before adding a new one to prevent unexpected active server changes
- Show a Snackbar when another server is added indicating success with a button to activate it, or failure
* Remove unused ServerManager
* Fix tag import
* Migrated all table names to lower snake case
* Migrated all table names to lower snake case
* Migrated all table names to lower snake case
* Migrated all column names to lower snake case
* Migrated all column names to lower snake case
* Merged the migrations to 1 migration
* Fixed feedback
* Update migration script
- Add option to quick settings tile to only allow interacting with it when the device is unlocked, similar to device controls on Android 13 (but phrased differently to match the system default behavior)
* Add new option to vibrate when quick settings tile is clicked
* Use vibration effects if the device supports it
* Review comments
* Remove question mark
* Set switch color when unchecked
* Add caching of favorites, results in prettier loading
* Update wear/src/main/java/io/homeassistant/companion/android/home/MainViewModel.kt
Co-authored-by: Joris Pelgröm <jpelgrom@users.noreply.github.com>
* Implement a lot suggestions from @jpelgrom
Revert previous changes to database and implement properly
* Apply suggestions from code review
Co-authored-by: Joris Pelgröm <jpelgrom@users.noreply.github.com>
* Implement suggestions from @jpelgrom
* Remove null assertions from icon function
* Update wear/src/main/java/io/homeassistant/companion/android/home/views/MainView.kt
Co-authored-by: Joris Pelgröm <jpelgrom@users.noreply.github.com>
* Fallback to entity ID if friendly_name is missing when creating cache,
Remove wrapper function to delete cached items
* Remove "clear cache" button
* Implement changes by @jpelgrom
Co-authored-by: Joris Pelgröm <jpelgrom@users.noreply.github.com>
* Improve adding quick settings tiles
- Use the new option available on Android 13 to prompt the user to add a tile to the quick settings panel, if a tile wasn't already added
- Switch Toast to Snackbar
- Move some logic from the manage tiles view to viewmodel
* Only show subtitle field when supported
- Setting a tile subtitle is only supported on Android Q+, so don't show the field on versions before that!
* Deeplink into app for tiles that aren't setup
- Instead of disabling a tile if it isn't setup, if the user is logged in set it up as inactive with the default icon/label and deeplink into the app settings with a notice that it needs to be setup first. This provides a better first use experience, as the user can simply tap it to setup instead of requiring them to manually go to the settings.
* Show the charging state on the Battery Level sensor's icon.
A different icon will be shown for wired and wireless charging.
From now on, changing only the icon (but not the state) of a sensor will trigger sending an update to the server.
A new DB property called last_sent_icon is added, thus a DB migration is needed.
* Merge SensorDao.updateLastSendState(…) and updateLastSentIcon(…) methods to updateLastSentStateAndIcon(…)
* Add entity state complication with hardcoded entity id
* Add config activity and save entity id in DB
* Update complications when entity state changes
* Allow all entity types for complication
* Update config layout
* remove unused file
* Upload database json
* Process review comments!
* Fix little bug
* Icon background and error catching
* Add automatic refresh and fix missed Dao inject
* Add icons for standard domains
91cd584b4b/src/common/const.ts (L66)
* Cleanup and further icon updates
* Sync sensor enabled state from app to core
- Change sensor 'registered' to indicate not registered, registered as disabled or registered as enabled
- When a sensor is disabled, set it's status as such on core 2022.6 servers
- In the sensor registration, use the basic sensor details in case there is no info in the database that can be used
* Clean up version check
- Now that there is a standard function to get the version, re-use it
* Improve which sensors are synced to core
- Update database migration to reset registration state on db upgrade to make sure the information is correct for all sensors
- Only sync sensors that are actually available on the device
- Fix registering all sensors on core <2022.6 on app/core version change
- Fix unnecessary sensor updates due to location sensors which are never registered always triggering update on core >=2022.6
* Sync sensor enabled state from core to app
- After pushing app enabled changes to core, if on core 2022.6 check if the enabled state for any of the sensors is different from what is registered in the app and try to update the sensors. This is done by reading the entire config, because otherwise we wouldn't know about sensors that have been enabled and the app already updates all sensors at the same time so no need for tracking individual updates in the sensor update response.
- Restore getting config using webhooks, because only the webhook config contains information about entity enabled state
- Add support for opening a specific sensor's settings page, used for the notification when trying to enable a sensor that requires granting (additional) permissions
* Update Media Player Widget Preview
* Add support for multiple media players. optionally show media source label
* fix crop of media player widget preview image. avoid unnecessary api call's when finding active media player. add db migrations. add text color to media source label. set default value of showsource to false.
* remove placeholder source for source icon to fix widget preview
* Add transparent widgets
- Add options to the service, entity and template widgets to have a transparent background
- Register configuration change intent filter for widgets in order to be able to respond to day/night changes (no longer fully automatic due to setting color with int)
* Support Material You dynamic color in widgets
- In widgets that support theming (day/night or transparent), add an option to use Material You dynamic colors
- Dynamic colors is now the default widget style for new widgets on devices that support them
* Tweak dynamic color theming
- Update dynamic color values to better match other themed widgets such as those from Google
- Remove configuration changed intent receiver for widgets because it is no longer required to get colors
* Add dynamic color theming to media player widget
- Make the media player widget themeable and add an option to use dynamic colors (transparent doesn't make sense for this layout)
* Fix camera widget background if data cannot be loaded
* Add text size option to template widgets
- Added an option to set the text size to template widgets to better align with other widget options
* Additional Android 12 widget updates
- When using the dynamic color theme, also use the new Android 12 widget corner radius
- Update placeholder values in widgets to match images, and refer to dynamic color XML to provide a better preview on Android 12. Reset values when providing template to match existing behaviour when no widget is found in the database.
- Update entity state and template widget target size to 2x1 to match preview image
- Make sure media player album art doesn't extend past corner radius if possible
* Change theme selection to dropdown, text color alignment
- Change theme selection to use a dropdown menu (Spinner) instead of right-aligned radio buttons on multiple lines
- Change text color selection to left-align radio buttons