Commit Graph

326 Commits

Author SHA1 Message Date
Justin Bassett
c4da52bdab
Hilt Dependency Update (#3681)
* Bump com.google.dagger:hilt-android-gradle-plugin from 2.46.1 to 2.47

Bumps [com.google.dagger:hilt-android-gradle-plugin](https://github.com/google/dagger) from 2.46.1 to 2.47.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.46.1...dagger-2.47)

---
updated-dependencies:
- dependency-name: com.google.dagger:hilt-android-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump com.google.dagger:hilt-android-compiler from 2.46.1 to 2.47

Bumps [com.google.dagger:hilt-android-compiler](https://github.com/google/dagger) from 2.46.1 to 2.47.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.46.1...dagger-2.47)

---
updated-dependencies:
- dependency-name: com.google.dagger:hilt-android-compiler
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump com.google.dagger:hilt-android from 2.46.1 to 2.47

Bumps [com.google.dagger:hilt-android](https://github.com/google/dagger) from 2.46.1 to 2.47.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.46.1...dagger-2.47)

---
updated-dependencies:
- dependency-name: com.google.dagger:hilt-android
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-19 15:35:11 -04:00
Joris Pelgröm
ef916f606b
Breaking change: support last_used/preferred pipeline IDs and use last_used by default (#3669)
Support last_used/preferred pipeline IDs and use last_used by default
2023-07-18 18:42:36 -04:00
Joris Pelgröm
00c2ef6d9e
Add toggle for Assist as assistant app on Wear (#3663)
Add toggle for assistant app intent filter on Wear

 - Adds a toggle for enabling/disabling Assist as an assistant app (= intent filter on Assist activity), as users may not be able to change the app used after choosing 'Always' and Wear OS 2 doesn't ask the user which app to use which can result in Assist instead of the Google Assistant being forced.
2023-07-17 08:10:15 -04:00
Joris Pelgröm
bc103636db
Update/replace deprecations in app module (#3661) 2023-07-17 08:08:20 -04:00
dependabot[bot]
9029f098d0
Bump com.google.guava:guava from 32.0.1-android to 32.1.1-android (#3630)
* Bump com.google.guava:guava from 32.0.1-android to 32.1.1-android

Bumps [com.google.guava:guava](https://github.com/google/guava) from 32.0.1-android to 32.1.1-android.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Add dependency resolution strategy per release notes

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Joris Pelgröm <joris.pelgrom@gmail.com>
2023-07-07 11:56:59 -04:00
Justin Bassett
7a7464c070
Bump dependency versions. (#3627) 2023-07-01 01:14:24 +00:00
Joris Pelgröm
3338437e7d
Support sensor display precision (#3625)
* Support sensor display precision

* Apply Lint suggestion in same function
2023-06-30 20:04:56 -04:00
Joris Pelgröm
48a7755e62
Add shortcut for Assist (#3615)
- Adds a shortcut to the app that allows accessing Assist from the home screen, including options for pipeline and voice/text
2023-06-29 22:19:13 -04:00
Joris Pelgröm
edf6ba5b9f
Use Assist pipeline STT/TTS on Wear OS (#3611)
* Use Assist pipeline STT/TTS on Wear OS

 - Update Assist pipeline support on Wear OS to use the pipelines' STT/TTS capabilities, if available and if the app has the required permission
 - Move UrlHandler functions (app) to UrlUtil (common)

* Create a base AssistViewModel for sharing code

 - Creates AssistViewModelBase in common to share Assist tasks that appear in both the main app and watch app

* Keep screen on during voice input to avoid interruption
2023-06-29 22:17:26 -04:00
Justin Bassett
0ef3bc4461
First attempt at a new release model. (#3597)
* First attempt at a new release model.

* Fix bad syntax

* Bump year and month with another job

* Use the plugin's version in apps.

* Make sure to generate the pre release weekly.

* Review Comments.
2023-06-26 09:05:17 -04:00
Joris Pelgröm
27d53fc672
Add intent filter for button to Wear Assist activity (#3608) 2023-06-25 22:00:22 -04:00
Joris Pelgröm
3c706bb7b1
Update Wear Assist with continued conversations, pipelines (#3604)
- Allow continuing conversation for Assist on watches by adding a mic input button at the bottom of the screen
 - Allow changing pipelines for Assist on watches when on a supported core version
 - Preparing for pipeline STT and TTS
2023-06-25 21:58:54 -04:00
dependabot[bot]
89b217ffef
Bump com.google.guava:guava from 32.0.0-android to 32.0.1-android (#3578)
Bumps [com.google.guava:guava](https://github.com/google/guava) from 32.0.0-android to 32.0.1-android.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-19 14:51:31 -04:00
dependabot[bot]
30024d5255
Bump org.jetbrains.kotlin:kotlin-stdlib from 1.8.21 to 1.8.22 (#3573)
Bumps [org.jetbrains.kotlin:kotlin-stdlib](https://github.com/JetBrains/kotlin) from 1.8.21 to 1.8.22.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/commits)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-19 14:51:20 -04:00
Joris Pelgröm
1cae83c40e
Implement native Assist (#3589)
* Native Assist setup + text input

* Minor (text input) UI tweaks and fixes

 - Set a very light window tint to increase contrast on white backgrounds
 - Keyboard to outline for consistency
 - Text input: keyboard action, keyboard icon to outline for consistency, show keyboard when switching
 - Fix reset conversation on recreation

* Voice input

 - Add basic voice input support to the native Assist interface

* Voice input bugfixes

 - Don't block voice output while sending data via websocket
 - Drop voice output data if there is a subscriber and the buffer is full by specifying a buffer + overflow strategy that matches behavior when there are no subscribers
 - Properly stop AudioRecord reading when job is cancelled (non-suspending function)
 - Stop recorder before stopping output collection

* Voice responses (generated TTS) playback

 - Play received tts-end events when using voice input
 - Update permission info on resume to catch granted permissions while in the background

* Pipeline switcher

 - Allow switching between all different pipelines
 - Add icon content descriptions

* Check + show attribution

* Prevent sheet that is too high pushing controls away

* UI feedback: pipelines and attribution

* Update Automotive manifest

* Fix speech bubble size for larger responses

* Update manifest to handle tasks/backstack better

 - Set the affinity to a value to make sure Assist is always launched in another task than the main app
 - Automatically remove from recents as Assist will be the only thing in it's task, after finishing there's nothing left to (re)start

* App-specific feature checks and error handling

 - Check for microphone support on device
 - Handle connectivity errors
 - Handle argument errors
 - Handle errors for pipelines that are no longer visible

* More UI feedback

 - Add a title to the sheet to make sure people know this is the Home Assistant app
 - Fix TextField alignment

* More header means max height adjustment
2023-06-19 14:50:06 -04:00
Joris Pelgröm
5d1801cb01
Set Wear theme background color to black (#3572)
* Set Wear theme background color to black

* Remove background color in individual screens
2023-06-19 14:09:44 -04:00
dependabot[bot]
0aad2cb18e
Bump com.google.guava:guava from 31.1-android to 32.0.0-android (#3559)
Bumps [com.google.guava:guava](https://github.com/google/guava) from 31.1-android to 32.0.0-android.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-02 20:45:55 -04:00
Joris Pelgröm
8dac1627f4
Update Wear Scaffold usage to be more consistent (#3562)
* Update TimeText to only show at the top of the screen

* Add Scaffold with PositionIndicator and TimeText where missing
2023-06-02 20:45:06 -04:00
Joris Pelgröm
9071302fef
Align dependency versions and bump Google dependencies (#3560)
* Align dependency versions and bump Google dependencies

* Fix overload resolution ambiguity
2023-06-02 20:40:15 -04:00
dependabot[bot]
a5cfab0c3d
Bump com.google.dagger:hilt-android from 2.45 to 2.46.1 (#3548)
Bumps [com.google.dagger:hilt-android](https://github.com/google/dagger) from 2.45 to 2.46.1.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.45...dagger-2.46.1)

---
updated-dependencies:
- dependency-name: com.google.dagger:hilt-android
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-26 08:35:31 -04:00
dependabot[bot]
bfaace566a
Bump org.jetbrains.kotlinx:kotlinx-coroutines-guava from 1.6.4 to 1.7.1 (#3541)
Bumps [org.jetbrains.kotlinx:kotlinx-coroutines-guava](https://github.com/Kotlin/kotlinx.coroutines) from 1.6.4 to 1.7.1.
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.6.4...1.7.1)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-guava
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-22 11:50:03 -04:00
dependabot[bot]
d6996ce527
Bump com.google.dagger:hilt-android-compiler from 2.45 to 2.46.1 (#3539)
Bumps [com.google.dagger:hilt-android-compiler](https://github.com/google/dagger) from 2.45 to 2.46.1.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.45...dagger-2.46.1)

---
updated-dependencies:
- dependency-name: com.google.dagger:hilt-android-compiler
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-22 11:49:07 -04:00
dependabot[bot]
2cfc018101
Bump org.jetbrains.kotlinx:kotlinx-coroutines-android from 1.6.4 to 1.7.1 (#3528)
Bump org.jetbrains.kotlinx:kotlinx-coroutines-android

Bumps [org.jetbrains.kotlinx:kotlinx-coroutines-android](https://github.com/Kotlin/kotlinx.coroutines) from 1.6.4 to 1.7.1.
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.6.4...1.7.1)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-android
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-20 19:18:26 +00:00
dependabot[bot]
774003b154
Bump org.jetbrains.kotlin:kotlin-stdlib from 1.8.20 to 1.8.21 (#3492)
Bumps [org.jetbrains.kotlin:kotlin-stdlib](https://github.com/JetBrains/kotlin) from 1.8.20 to 1.8.21.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.8.21/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.8.20...v1.8.21)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-20 14:59:01 -04:00
Joris Pelgröm
d81913b7ea
Add throttling/debouncing on Wear OS for registry updates (#3517) 2023-05-12 23:00:56 -04:00
Joris Pelgröm
7d6f11af4f
Add support for Assist pipeline, update Wear implementation (#3526)
* Group incoming messages by subscription to prevent out-of-order delivery

 - Messages received on the websocket are processed asynchronously, which is usually fine but can cause issues if messages need to be received in a specific order for a subscription. To fix this, process messages in order for the same subscription.

* Implement Assist pipeline API

 - Add basic support for the Assist pipeline API
 - Update conversation function to use the Assist pipeline when on the minimum required version
 - Update UI to refer to Assist pipeline requirement
2023-05-12 22:51:47 -04:00
dependabot[bot]
8b32f9bffd
Bump com.squareup.okhttp3:okhttp from 4.10.0 to 4.11.0 (#3490)
Bumps [com.squareup.okhttp3:okhttp](https://github.com/square/okhttp) from 4.10.0 to 4.11.0.
- [Release notes](https://github.com/square/okhttp/releases)
- [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/square/okhttp/compare/parent-4.10.0...parent-4.11.0)

---
updated-dependencies:
- dependency-name: com.squareup.okhttp3:okhttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-24 21:09:24 -04:00
Joris Pelgröm
608a11211e
Use Kelvin for light color temperature if available (#3477)
- When using at least HA 2022.11, use Kelvins for the color temperature instead of mireds to match the frontend
2023-04-24 21:06:42 -04:00
dependabot[bot]
6b03613352
Bump com.android.tools.build:gradle from 7.4.2 to 8.0.0 (#3474)
* Bump com.android.tools.build:gradle from 7.4.2 to 8.0.0

Bumps com.android.tools.build:gradle from 7.4.2 to 8.0.0.

---
updated-dependencies:
- dependency-name: com.android.tools.build:gradle
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump Gradle version

* Build default values changes

 - Remove items that match new defaults
 - Add item to keep old default to allow for those changes to happen in another PR

* Align target Kotlin version with target Java version

* Use JDK 17

* Remove one more item that now matches default

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Joris Pelgröm <joris.pelgrom@gmail.com>
2023-04-24 21:05:20 -04:00
Joris Pelgröm
64ee62b8fa
Entity state complication improvements (more flexibility) (#3465)
* 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
2023-04-08 16:33:16 -04:00
Daniel Shokouhi
186e43b0e7
Bump a few app dependencies (#3461) 2023-04-07 19:11:16 -04:00
Joris Pelgröm
34ac4ad298
Disable favorites only view on Wear if all favorites are deleted (#3454) 2023-04-07 19:09:09 -04:00
Markus Friedli
b4f877aa2d
Add Android OS sensors (#3449)
* Add Android OS sensors

* Rework review findings
2023-04-07 19:08:14 -04:00
Joris Pelgröm
75c7c08b2b
Improve phone feedback for Wear onboarding (#3450)
- Show a loading indicator after sending data
 - Show a Snackbar for success/errors
2023-04-02 20:20:16 -04:00
dependabot[bot]
e592c334ea
Bump org.jetbrains.kotlin:kotlin-stdlib from 1.8.10 to 1.8.20 (#3442)
Bumps [org.jetbrains.kotlin:kotlin-stdlib](https://github.com/JetBrains/kotlin) from 1.8.10 to 1.8.20.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/commits)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-01 04:02:29 +00:00
Joris Pelgröm
cc20ffe83b
Add logged out state to Wear tiles (#3440)
- Adds a generic tile to be used when the Wear app isn't logged in
 - Simplify tile root layout building using Timeline.fromLayoutElement
2023-03-31 23:35:34 -04:00
Joris Pelgröm
b6688c6388
Share Wear session with main app to fix mismatch (#3439)
- Exchange server information between the Wear app and phone app, and create a temporary server on the phone that holds the Wear server information, to ensure that the same server is used on both devices
2023-03-31 23:30:57 -04:00
Joris Pelgröm
8d2c9f1cb4
Get user information and prevent using admin-only calls (#3417)
* 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
2023-03-16 07:10:27 +00:00
Joris Pelgröm
1a7091a761
Server trust feature (#3410)
* Server trust feature

* Always allow clear_notification, remove_channel and command_stop_tts commands
2023-03-15 19:14:39 -04:00
Joris Pelgröm
cc8dd47fcd
Drop 'tile' from template tile name (#3414) 2023-03-10 18:23:43 +00:00
Joris Pelgröm
b97383ebdf
Google dependency bumps (#3393)
* Google dependency bumps

* kotlinCompilerExtensionVersion
2023-03-03 19:49:18 +00:00
Joris Pelgröm
b508114d75
Push Wear users to install app on phone (#3388)
* Push Wear users to install app on phone

 - Push Wear OS users to install the app on their phone if they don't already have it, as the sign in experience is a lot better and less sensitive to errors
 - Allow using 'Advanced' if the user cannot or doesn't want to install the app on their phone

* Fix import

* Add time
2023-03-03 14:11:14 -05:00
Daniel Shokouhi
4984c9c1a3
Update Play Store listing for upcoming play policy changes for Wear OS (#3387)
* Update play store listing for wear OS

* Update description and add screenshots for tiles

* Update phone screenshots to be consistent and showcase some widgets

* Fix small size

* Use single screenshot to show widgets and meet requirements

* Update home screen images

* Show all widgets

* Update camera widget image, oops

* Fix screenshots
2023-03-03 14:09:05 -05:00
Daniel Shokouhi
73b9ca471e
Use a black background for Wear OS onboarding screens (#3386) 2023-03-03 14:07:57 -05:00
Jorden
f763c69344
Update Splash Screen due to new requirements (#3381)
Update Splash Screen
2023-03-01 12:08:47 -05:00
dependabot[bot]
a2f85ef475
Bump org.jlleitschuh.gradle.ktlint from 11.1.0 to 11.2.0 (#3334)
* Bump org.jlleitschuh.gradle.ktlint from 11.1.0 to 11.2.0

Bumps org.jlleitschuh.gradle.ktlint from 11.1.0 to 11.2.0.

---
updated-dependencies:
- dependency-name: org.jlleitschuh.gradle.ktlint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* gradlew ktlintFormat

* Rename packages with underscores

> Task :app:ktlintMainSourceSetFormat FAILED
home-assistant-android\app\src\main\java\io\homeassistant\companion\android\widgets\media_player_controls\MediaPlayerControlsWidget.kt:1:1 Package name must not contain underscore (cannot be auto-corrected)
home-assistant-android\app\src\main\java\io\homeassistant\companion\android\widgets\media_player_controls\MediaPlayerControlsWidgetConfigureActivity.kt:1:1 Package name must not contain underscore (cannot be auto-corrected)

Rename: media_player_controls to mediaplayer

> Task :wear:ktlintMainSourceSetFormat FAILED
home-assistant-android\wear\src\main\java\io\homeassistant\companion\android\onboarding\manual_setup\ManualSetupActivity.kt:1:1 Package name must not contain underscore (cannot be auto-corrected)
home-assistant-android\wear\src\main\java\io\homeassistant\companion\android\onboarding\manual_setup\ManualSetupModule.kt:1:1 Package name must not contain underscore (cannot be auto-corrected)
home-assistant-android\wear\src\main\java\io\homeassistant\companion\android\onboarding\manual_setup\ManualSetupPresenter.kt:1:1 Package name must not contain underscore (cannot be auto-corrected)
home-assistant-android\wear\src\main\java\io\homeassistant\companion\android\onboarding\manual_setup\ManualSetupPresenterImpl.kt:1:1 Package name must not contain underscore (cannot be auto-corrected)
home-assistant-android\wear\src\main\java\io\homeassistant\companion\android\onboarding\manual_setup\ManualSetupView.kt:1:1 Package name must not contain underscore (cannot be auto-corrected)

Rename: manual_setup to manual

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Joris Pelgröm <joris.pelgrom@gmail.com>
2023-03-01 12:05:54 -05:00
Daniel Shokouhi
c066e7c3cf
Disable auto suggest on input fields for URLs (#3377)
* Disable auto suggest on input fields for URLs

* Wear OS too
2023-02-27 22:52:45 -05:00
Daniel Shokouhi
5f164ff5a6
Bump some project dependencies (#3347)
* Bump some project dependencies

* Bump kotlin too

* Use correct kotlin library
2023-02-21 12:55:00 -05:00
dependabot[bot]
4fcd20c72d
Bump com.google.dagger:hilt-android from 2.44.2 to 2.45 (#3335)
Bumps [com.google.dagger:hilt-android](https://github.com/google/dagger) from 2.44.2 to 2.45.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.44.2...dagger-2.45)

---
updated-dependencies:
- dependency-name: com.google.dagger:hilt-android
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-17 09:01:08 -05:00
Daniel Shokouhi
fd1ae9e39b
Update sensor enabled by default logic to be more granular (#3315) 2023-02-15 01:56:18 +00:00
dependabot[bot]
55fff2b87f
Bump com.google.dagger:hilt-android-compiler from 2.44.2 to 2.45 (#3330)
Bumps [com.google.dagger:hilt-android-compiler](https://github.com/google/dagger) from 2.44.2 to 2.45.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.44.2...dagger-2.45)

---
updated-dependencies:
- dependency-name: com.google.dagger:hilt-android-compiler
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-14 20:35:38 -05:00
Daniel Shokouhi
8bede17fd6
Show version number in Wear OS settings (#3327) 2023-02-14 20:33:03 -05:00
Joris Pelgröm
f7cec0e5a2
Multiserver (#3332)
* 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
2023-02-14 20:30:06 -05:00
Daniel Shokouhi
047abe93ba
Add new option to only show favorites on home screen (#3276)
* Add new option to only show favorites on home screen

* Review comments

* Review comments
2023-02-01 12:04:24 -05:00
Daniel Shokouhi
152d11147a
Add a watchface complication for Assist (#3284) 2023-01-31 14:56:03 -05:00
Daniel Shokouhi
60f76fcd45
Add TTS notifications to Wear OS (#3266) 2023-01-31 14:18:58 -05:00
Daniel Shokouhi
00588d0270
Only show not supported error after support check is complete and design tweaks (#3270)
* Only show not supported error after support check is complete

* Minor design tweaks
2023-01-26 18:01:06 -05:00
dependabot[bot]
cfc07362e8
Bump jackson-module-kotlin from 2.13.4 to 2.13.5 (#3256)
Bumps [jackson-module-kotlin](https://github.com/FasterXML/jackson-module-kotlin) from 2.13.4 to 2.13.5.
- [Release notes](https://github.com/FasterXML/jackson-module-kotlin/releases)
- [Commits](https://github.com/FasterXML/jackson-module-kotlin/compare/jackson-module-kotlin-2.13.4...jackson-module-kotlin-2.13.5)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.module:jackson-module-kotlin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-25 20:32:51 -05:00
Daniel Shokouhi
6be617e666
Add ble transmitter and beacon monitor notification commands to Wear OS (#3253)
* Add ble transmitter and beacon monitor commands to Wear OS

* Move log to command check failure
2023-01-25 20:32:32 -05:00
Daniel Shokouhi
65696e891b
Make conversation activity launchable (#3254)
* Make conversation activity launchable

* Use better launcher icons per review comments

* Review comments
2023-01-24 22:27:04 -05:00
Joris Pelgröm
9e8e37a5c2
Fix conversation tile vibrate after settings split (#3246) 2023-01-20 19:59:53 +00:00
Joris Pelgröm
a4fd7d4fd8
Set Wear OAuth redirect URI automatically and catch exceptions (#3244)
- Allow the Wear support libraries to specify the redirect URI to use for OAuth login
 - Catch any exceptions that might be thrown when building an OAuth request
2023-01-20 14:11:01 -05:00
Joris Pelgröm
e382a4b687
Split app-level and server-level settings (#3241)
* Move server settings to a server settings screen

 - Move server-specific settings to a new screen to be accessed from the main settings only containing server specific settings in preparation for multiserver
 - Sensors is currently not server-specific even though one setting is stored by server ID, to be fixed later

* Store app preferences in another shared preferences file

 - Store app preferences not in the integration shared preferences file, but in the shared preferences file for general prefs (it is named themes but there are already other app-level prefs in it)
 - Move Wear specific preferences to it's own repository + shared preferences file

* Improve server row with local data

 - While we don't have a server name or user name, show the registration name when available to improve the server row layout

* Simplify location permission request code

 - Remove the flexible permission requests as it isn't used in the current settings structure, only expect location permissions
 - Switch from the deprecated functions to the new flow using activity result contracts

* Remove unused string
2023-01-20 14:10:21 -05:00
Daniel Shokouhi
ca8059da65
Add bluetooth skippable intents in case sensor is not enabled (#3240) 2023-01-20 14:05:10 -05:00
Daniel Shokouhi
cce8b60c66
Conversation tile design changes (#3233)
* Update conversation UI with speech bubble

* Clean up design, vibrate when displaying response, close activity if screen turns off

* Review comments

* Switch response side to better match frontend

* Design tweaks

* Use row padding instead of spacer
2023-01-20 14:03:30 -05:00
Daniel Shokouhi
346ef3da5f
Initial commit of notification support on Wear OS (#3221)
* Initial commit of wear OS notifications

* Update to allow message and title

* Move constants to object to reduce imports

* Split up logic to match phone app

* Update readme and set websocket to false for wear OS

* Bump firebase BOM
2023-01-20 14:02:03 -05:00
Justin Bassett
220b73d20f
Bump a bunch of dependencies. (#3216) 2023-01-13 11:18:54 -05:00
Daniel Shokouhi
a5cbe04315
Update conversation tile text and icon (#3209)
* Update conversation tile text and icon

* Minor design tweaks: increase corner radius, push down icon

* Update per review comment
2023-01-12 16:05:07 -05:00
Justin Bassett
d1e0f29486
Fix Build/Deploy 2023-01-11 22:44:30 -05:00
Daniel Shokouhi
f3360b1b92
Update health services dependency (#3212) 2023-01-11 22:04:19 -05:00
Daniel Shokouhi
527325f153
Add missing phone permission to Wear manifest (#3200) 2023-01-11 16:38:25 -05:00
Daniel Shokouhi
db63a38cd5
Migrate bluetooth sensors to common and add to wear OS (#3168)
* Migrate bluetooth sensors to common and add to wear OS

* Add missing BT permissions and register for state change events

* Update permissions again
2023-01-11 16:37:00 -05:00
Joris Pelgröm
7e5e3adfe9
Use entity icon for quick settings tiles by default (#3160)
- When creating a new quick setting tile, use the entity's icon by default
 - Move Wear icon based on entity domain code to common
2022-12-18 15:31:01 -05:00
Daniel Shokouhi
7f32738e10
Add a tile to start a conversation (#3158)
* Add a tile to interact with conversation integration

* Check HA core version and that conversation is enabled

* Rename search to conversation

* Add some TODOs, review comments for more clean up

* Review comment

* Add back private set
2022-12-18 15:25:00 -05:00
Daniel Shokouhi
8df504e1d7
Migrate more sensors to Wear OS (#3115) 2022-12-18 15:20:12 -05:00
Daniel Shokouhi
5780f1492b
Restart health services if no updates received in 30 minutes (#3126)
* Restart health services if no updates received in 30 minutes

* Only update activity state if the state changes or an update needs to be forced
2022-12-16 09:59:29 -05:00
Daniel Shokouhi
49849d4587
Let heart rate sensor get up to 10 events in case first is invalid (#3125)
* Let heart rate sensor get up to 5 events in case first is invalid

* Increase to 10 events to try and get a reading
2022-12-16 09:58:28 -05:00
Daniel Shokouhi
d5714d85e4
Only subscribe to supported entities on Wear OS home screen (#3103)
* Only subscribe to favorite entities on Wear OS homescreen

* Switch to subscribing to all supported domains

* Update entity states when app is resumed and entities are loaded to keep things in sync

* Only update domains when needed

* Update all registeries when we resume

* Move UI update to view model

* Review comment

* Clear values before updates

* Process review comments
2022-11-30 14:59:57 -05:00
Daniel Shokouhi
8563efef5f
Add some debug logs for heart rate sensor (#3111) 2022-11-28 22:15:36 -05:00
Joris Pelgröm
442cb25e59
Add deeplinks to Wear OS sensor sync notifications (#3105)
Add deeplinks to Wear sensor sync notifications
2022-11-28 22:11:57 -05:00
Daniel Shokouhi
fd7a593c41
Fix current version sensor so it properly reports the flavor (#3104)
* Fix current version sensor so it properly reports the flavor

* Review comments
2022-11-28 22:11:12 -05:00
Daniel Shokouhi
f15b192a79
Reduce usage of job scheduling to avoid throttling (#3087) 2022-11-22 14:04:55 -05:00
Daniel Shokouhi
382b26c4c3
Skip heart rate value updates when below 0 (#3081) 2022-11-22 13:59:58 -05:00
Daniel Shokouhi
5a38f95482
Add proper device class for daily distance sensor on Wear OS3 (#3079)
* Add proper device class for daily distance sensor on Wear OS3

* Only use the device class distance when supported
2022-11-22 13:57:21 -05:00
dependabot[bot]
62ebb90f2e
Bump hilt-android from 2.44 to 2.44.2 (#3071)
Bumps [hilt-android](https://github.com/google/dagger) from 2.44 to 2.44.2.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.44...dagger-2.44.2)

---
updated-dependencies:
- dependency-name: com.google.dagger:hilt-android
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-17 14:42:31 +00:00
dependabot[bot]
1b5ab1c2ec
Bump hilt-android-compiler from 2.44 to 2.44.2 (#3072)
Bumps [hilt-android-compiler](https://github.com/google/dagger) from 2.44 to 2.44.2.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.44...dagger-2.44.2)

---
updated-dependencies:
- dependency-name: com.google.dagger:hilt-android-compiler
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-17 09:30:21 -05:00
Daniel Shokouhi
a390865cad
Store health services updates and send them with worker updates (#3076)
* Store health services updates and send them with worker updates

* Switch update type to worker
2022-11-17 09:06:56 -05:00
Joris Pelgröm
0bccff65c3
Revert jackson-module-kotlin bump to fix compatibility on older Android version (#3077) 2022-11-17 09:06:31 -05:00
Daniel Shokouhi
494414eb87
Add Daily Calories, Distance and Steps sensors for health services (#3054)
* Add Daily Calories, Distance and Steps sensors for health services

* Process data points before condition to push update
2022-11-12 08:24:17 -05:00
Daniel Shokouhi
33d1e30cb1
Switch from viewModelScope to lifecycleScope for external collections (#3045)
* Switch from viewmodelscope to lifecyclescope for external collections

* Check loading state before collecting

* Revert previous changes for checking loading state

* Skip collection if not connected

* Simplify launching collections
2022-11-12 08:23:44 -05:00
dependabot[bot]
a20fb24ddc
Bump jackson-module-kotlin from 2.13.4 to 2.14.0 (#3048)
Bumps [jackson-module-kotlin](https://github.com/FasterXML/jackson-module-kotlin) from 2.13.4 to 2.14.0.
- [Release notes](https://github.com/FasterXML/jackson-module-kotlin/releases)
- [Commits](https://github.com/FasterXML/jackson-module-kotlin/compare/jackson-module-kotlin-2.13.4...jackson-module-kotlin-2.14.0)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.module:jackson-module-kotlin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-09 16:18:05 -05:00
Daniel Shokouhi
afa8a83496
Add missing boot completed permission for Wear OS (#3042) 2022-11-09 16:15:26 -05:00
Daniel Shokouhi
6f2b5cf9eb
Remove unneeded kotlin option (#3039) 2022-11-09 16:15:08 -05:00
Daniel Shokouhi
57b3b771b4
Track time between hardware sensor updates to restart the listener as needed (#3026)
* Check if listener got stuck for heart rate sensor and restart if needed

* Apply reset listener logic to other hardware sensors

* Review comments
2022-11-09 16:14:49 -05:00
Daniel Shokouhi
affc60178e
Add daily floors sensor for Wear OS3 devices (#3005)
* Add daily floors sensor for Wear OS3 devices

* Do a compatibility check for sensor availability in health services

* Print more logs and attempt to send latest data, update more getAvailableSensor methods

* Process review comments

* Process more review comments, use actual time in millis

* Clear out available sensors when updating with new list

* Log the capabilities in case we need to troubleshoot later

* Review comment

* Missed one additional review comment

* Return immediately instead of storing a list
2022-11-09 16:12:13 -05:00
Mads Sørensen
e01246ae28
Add caching of favorites in Wear OS, resulting in prettier loading (#2982)
* 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>
2022-11-09 16:06:38 -05:00
Daniel Shokouhi
c89184bf31
Bump and switch to compose BOM dependency (#3028)
* Bump and switch to compose BOM dependency

* Bump kotlin and compose extensions
2022-11-03 12:31:35 -04:00
Jorden
1b1c2bb672
Change DocsLink in Wear OS Sensors (#3017) 2022-11-03 12:27:38 -04:00
Daniel Shokouhi
7f5dd17c87
Add a heart rate sensor to Wear OS (#3008) 2022-10-28 13:34:05 -04:00
StopMotionCuber
11f2006924
Set focus for onboarding activity to support rotary input (#3009) 2022-10-28 13:21:17 -04:00