Commit Graph

343 Commits

Author SHA1 Message Date
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
Tiger Oakes
3f9b01affa
Remove unused setters (#3002) 2022-10-28 13:20:29 -04:00
Jorden
209497e0a2
Fix global vars in bedtime and theater mode (#3001) 2022-10-26 11:32:53 -04:00
Daniel Shokouhi
2a56db4a17
Add user activity sensor from health services for Wear OS (#2995)
* Add user activity sensor from health services for Wear OS

* Only add health services if device supports it

* Move library initialization to after isEnabled check

* Review comments
2022-10-25 21:31:28 +00:00
Jorden
1faf03a490
Add Wet Mode Sensor (#2994)
* Add Wet Mode Sensor

* Add Wet Mode Sensor

* Change Description

* Fix spelling

* Fix Sloppy mistakes
2022-10-25 17:12:28 -04:00
Daniel Shokouhi
6da455f1be
Add previews to Wear OS compose and sort sensor by name (#2984)
* Add composable previews for a few missing functions

* Sort sensors by name

* Review comment

* Specify the device for Wear OS previews
2022-10-25 17:08:06 -04:00
Tiger Oakes
993012f9dd
Convert Play tasks to coroutines (#2962)
* Convert tasks to coroutines

* Fix lint issues

* fullImplementation
2022-10-25 17:07:19 -04:00
Daniel Shokouhi
c95725f767
Add more Wear OS sensors (#2981)
* Add more Wear OS sensors

* Update description for how sensors update, also update the type
2022-10-21 18:19:41 +00:00
dependabot[bot]
bd26435eb8
Bump community-material-typeface from 6.4.95.0-kotlin to 7.0.96.0-kotlin (#2944)
* Bump community-material-typeface from 6.4.95.0-kotlin to 7.0.96.0-kotlin

Bumps [community-material-typeface](https://github.com/mikepenz/Android-Iconics) from 6.4.95.0-kotlin to 7.0.96.0-kotlin.
- [Release notes](https://github.com/mikepenz/Android-Iconics/releases)
- [Changelog](https://github.com/mikepenz/Android-Iconics/blob/develop/gradle-release.gradle)
- [Commits](https://github.com/mikepenz/Android-Iconics/commits)

---
updated-dependencies:
- dependency-name: com.mikepenz:community-material-typeface
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

* Rename text-to-speech to microphone-message

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>
Co-authored-by: Justin Bassett <bassett.justint@gmail.com>
2022-10-21 17:57:15 +00:00
dependabot[bot]
fa095a8bb2
Bump iconics-core from 5.3.4 to 5.4.0 (#2945)
Bumps [iconics-core](https://github.com/mikepenz/Android-Iconics) from 5.3.4 to 5.4.0.
- [Release notes](https://github.com/mikepenz/Android-Iconics/releases)
- [Changelog](https://github.com/mikepenz/Android-Iconics/blob/develop/gradle-release.gradle)
- [Commits](https://github.com/mikepenz/Android-Iconics/compare/v5.3.4...v5.4.0)

---
updated-dependencies:
- dependency-name: com.mikepenz:iconics-core
  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-10-21 17:56:36 +00:00
Daniel Shokouhi
e8fe823312
Add On Body sensor for Wear OS (#2961)
* Add On Body sensor for Wear OS

* Remove unnecessary requirement
2022-10-21 13:47:20 -04:00
dependabot[bot]
1d3e8d67e9
Bump iconics-compose from 5.3.4 to 5.4.0 (#2943)
Bumps [iconics-compose](https://github.com/mikepenz/Android-Iconics) from 5.3.4 to 5.4.0.
- [Release notes](https://github.com/mikepenz/Android-Iconics/releases)
- [Changelog](https://github.com/mikepenz/Android-Iconics/blob/develop/gradle-release.gradle)
- [Commits](https://github.com/mikepenz/Android-Iconics/compare/v5.3.4...v5.4.0)

---
updated-dependencies:
- dependency-name: com.mikepenz:iconics-compose
  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-10-21 13:42:10 -04:00
Joris Pelgröm
e287321c53
Show settings chip while loading Wear app (#2968)
* Show settings chip while loading Wear app

* Disable favorite editing while loading
2022-10-19 14:54:09 -04:00
Daniel Shokouhi
7c792c4d4b
Add permissions requests to wear OS sensors and add network sensors (#2956)
* Add permissions requests to wear OS sensors

* Add intents for network sensors on wear

* Separate background/foreground location permission requests

* Prompt for background permissions after foreground was successful

* Only set sensor to enabled if all permissions are grantted

* Review comments

* Process more review comments

* Remove unnecessary variable update
2022-10-19 14:48:35 -04:00
Joris Pelgröm
4a9dd8ba04
Android 13 notification changes + target (#2682)
* Request notification permission during onboarding

 - When using Android 13 or the minimal version, add a screen to onboarding to request to enable notifications on the device. This screen is based on iOS onboarding. When tapping Continue, on Android 13 this requests the system permission and/or on the minimal version this changes the websocket setting.
 - Compile with and target SDK 33 (targeting required to be able to request notification system permission on demand)

* Add notification settings link in settings when off

 - Show a new setting in settings for the user to enable notifications for the Home Assistant app, either because the permission was denied (Android 13) or the user manually turned off all notifications (Android 8-12).
 - This new setting replaces the notification channels setting when everything is off; in this case there is no point managing individual channels. If at least one channel is on, the existing notification channels setting is shown instead.

* Compose tweaks

 - Remove redundant content description for icon
 - Change to a simpler scroll modifier

* Fix skipping notifications on minimal version

 - Ensure that the value is actually saved to the database

* Post Bluetooth on/off commands as if invalid

 - When using Android 13, post notification commands to control Bluetooth on/off as a normal notification as if they were invalid, as the function has been deprecated for the app

* Remove type that can be inferred
2022-10-19 14:43:15 -04:00
Justin Bassett
1adc33bf61
Bump Hilt version to 2.44 (#2939)
Bump hilt version to 2.44
2022-10-01 17:12:32 -04:00
Joris Pelgröm
abf0220430
Update Gradle to 7.5.1, Android Gradle plugin to 7.3.0 (#2934)
- Update Gradle to latest version (7.5.1)
 - Update Android Gradle plugin to latest version (7.3.0)
 - Move package property out of manifest into gradle build files namespace as recommended
2022-10-01 16:14:45 -04:00
Joris Pelgröm
0222d6b673
Bump Google dependencies (#2910) 2022-09-24 16:04:58 -04:00
Daniel Shokouhi
7ab914a8bb
Mark Wear OS app as non-standalone since we use phone for sign in now (#2900) 2022-09-21 00:40:48 +00:00
Joris Pelgröm
69beab3a2a
Don't collapse lists by default if there's only one list (#2861)
Don't collapse lists by default if there's only one key

 - If there is only one key, the app shouldn't collapse it by default as the app may not use a collapsible header in that case
2022-09-10 15:17:10 -04:00
dependabot[bot]
2380741a45
Bump jackson-module-kotlin from 2.13.3 to 2.13.4 (#2851)
Bumps [jackson-module-kotlin](https://github.com/FasterXML/jackson-module-kotlin) from 2.13.3 to 2.13.4.
- [Release notes](https://github.com/FasterXML/jackson-module-kotlin/releases)
- [Commits](https://github.com/FasterXML/jackson-module-kotlin/compare/jackson-module-kotlin-2.13.3...jackson-module-kotlin-2.13.4)

---
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>
2022-09-05 14:42:26 +00:00
Joris Pelgröm
a711c659a4
Update Wear onboarding to always use phone for sign in (#2838)
* Always do Wear onboarding on phone

 - Switch the Wear onboarding to always use the sign in flow on the paired phone, instead of offering the option to sign in completely on the watch.
 - When opening the companion app using the Wear app, immediately link the user to the list of instances or sign in screen.
 - Use standard OAuth flow for devices without companion app installed.
 - Fix type casting of location preference in Wear onboarding result.

* Fix ListenableFuture await import
2022-09-05 10:25:13 -04:00
Joris Pelgröm
c6b36d82bb
Support device controls on locked Android 13 device (#2820)
- Add support for using device controls while the device is locked on Android 13 devices
 - Start compiling with Android 13's SDK to make this possible
2022-09-05 09:58:13 -04:00
Joris Pelgröm
3908a07c1f
Prevent crashes on Wear when offline / server no longer available (#2825)
- Catch exceptions thrown when executing calls to change an entity state instead of crashing the app
 - When revoking a session fails continue with logout as the server might no longer be available and the user otherwise might be 'locked in' with no way to change the server
2022-08-29 20:53:52 -04:00
Wouter van der Wal
0148c65284
Calculate fan speed step count (#2818)
* Calculate fan speed step count

* Fix linting issues

* Fixed wrong function name in log text

Co-authored-by: Joris Pelgröm <jpelgrom@users.noreply.github.com>

Co-authored-by: Joris Pelgröm <jpelgrom@users.noreply.github.com>
2022-08-29 20:27:02 -04:00
leroyboerefijn
d00c823651
Faster entity selection Wear OS (#2804)
* Always collapse headers and add favorites section

* Remove unneeded entity update subscription

* Process comments

* Use shorthand for favorites loop in MainView
2022-08-29 20:24:35 -04:00
Daniel Shokouhi
7f5ec402db
Bump some more app dependencies (#2792) 2022-08-13 20:52:34 -04:00
dependabot[bot]
ca6c0c505f
Bump hilt-android from 2.42 to 2.43.2 (#2754)
Bumps [hilt-android](https://github.com/google/dagger) from 2.42 to 2.43.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.42...dagger-2.43.2)

---
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>
2022-08-04 22:59:49 +00:00
dependabot[bot]
c45618b355
Bump hilt-android-compiler from 2.42 to 2.43.2 (#2755)
Bumps [hilt-android-compiler](https://github.com/google/dagger) from 2.42 to 2.43.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.42...dagger-2.43.2)

---
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>
2022-08-04 18:24:00 -04:00
Daniel Shokouhi
d68666dae0
Bump some app dependencies (#2751)
* Bump some phone app dependencies

* Add wear dependencies

* Bump compile SDK in common
2022-08-03 18:03:14 -04:00
Joris Pelgröm
bddb3a62dd
Don't include session in backup/transfer (#2747)
- The session data is unique to the device and shouldn't be included in a backup or transfer
 - Add Android 12+ backup rules for Wear OS
2022-08-03 18:02:31 -04:00
Joris Pelgröm
9fc98e464e
Remove error message on null template (#2735)
* Remove error message on null template

 - Null is a valid value for a template so the app should reflect that instead of suggesting there is an error, which may cause users to start looking in the wrong place.

* Log.e instead of Log.i
2022-08-03 17:59:00 -04:00
leroyboerefijn
e7a926396d
Implement html styling on the template tile (#2653)
* Implement styling on the template tyle

* Also process preview in phone settings

* Small cleanup

* Improve template null handling

* Update template rendering error

* Update help text to indicate new line and markup options

* Also support newline

* More extensive replacement for <br>
2022-07-29 17:42:17 -04:00
dependabot[bot]
41f6045557
Bump kotlinx-coroutines-android from 1.6.3 to 1.6.4 (#2678)
Bumps [kotlinx-coroutines-android](https://github.com/Kotlin/kotlinx.coroutines) from 1.6.3 to 1.6.4.
- [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.3...1.6.4)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-android
  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>
2022-07-17 03:32:15 +00:00
dependabot[bot]
b13f548aea
Bump kotlinx-coroutines-guava from 1.6.3 to 1.6.4 (#2679)
Bumps [kotlinx-coroutines-guava](https://github.com/Kotlin/kotlinx.coroutines) from 1.6.3 to 1.6.4.
- [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.3...1.6.4)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-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>
2022-07-16 23:25:27 -04:00
Joris Pelgröm
7b401abddc
Don't complete onboarding on registration error (#2646)
- Add specific error if the app encounters a HTTP 404 response during onboarding registration, because that means the mobile_app integration is missing
 - After an error, clean up the session data to make sure a new registration attempt is made
2022-06-30 21:58:24 -04:00
Joris Pelgröm
aa256676c4
Show entity state on chip background (#2634)
* Show entity state on entity chip in Wear OS app

 - Shows the color and position of an entity state on the entity's chip in the Wear OS app by using a custom background class that accepts more than a single Color

* Use horizontal instead of diagonal gradients

 - The default BrushPainter actually isn't the correct one, the ToggleChip class uses its own but that is marked as internal and we cannot override the default BrushPainter so another copied class it is

* RTL entity position support

 - When using an RTL language, the entity chip should fill in the position value from the right side

* Support cover position

 - Show cover position as entity chip's background
 - Adjust background color code to also work when a chip isn't checked for covers that are currently closing

* Cleanup EntityUi

* Cleanup duplicate code in device controls

* Naming conventions

 - Should've used a lowercase letter to start
 - Fix class

* Fix build

 - Updates because ToggleChipColors has changed
 - Add workaround for implementing Compose interface because kotlin-gradle-plugin is linked to stable Compose and we cannot update yet

* Update gradient values to match rc02

 - Wear Compose 1.0.0-rc02 changed the default values for the gradients in ToggleChips, so update the values used when using a custom background to match
2022-06-30 21:56:38 -04:00
dependabot[bot]
a9de8e3f72
Bump iconics-compose from 5.3.3 to 5.3.4 (#2643)
Bumps [iconics-compose](https://github.com/mikepenz/Android-Iconics) from 5.3.3 to 5.3.4.
- [Release notes](https://github.com/mikepenz/Android-Iconics/releases)
- [Changelog](https://github.com/mikepenz/Android-Iconics/blob/develop/gradle-release.gradle)
- [Commits](https://github.com/mikepenz/Android-Iconics/compare/v5.3.3...v5.3.4)

---
updated-dependencies:
- dependency-name: com.mikepenz:iconics-compose
  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>
2022-06-26 15:41:23 -04:00
dependabot[bot]
1efc605c42
Bump kotlinx-coroutines-android from 1.6.2 to 1.6.3 (#2642)
Bumps [kotlinx-coroutines-android](https://github.com/Kotlin/kotlinx.coroutines) from 1.6.2 to 1.6.3.
- [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.2...1.6.3)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-android
  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>
2022-06-26 15:41:08 -04:00
dependabot[bot]
9c2c2ae4ae
Bump kotlinx-coroutines-guava from 1.6.2 to 1.6.3 (#2639)
Bumps [kotlinx-coroutines-guava](https://github.com/Kotlin/kotlinx.coroutines) from 1.6.2 to 1.6.3.
- [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.2...1.6.3)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-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>
2022-06-26 18:36:44 +00:00
dependabot[bot]
1a9a8adfb5
Bump iconics-core from 5.3.3 to 5.3.4 (#2640)
Bumps [iconics-core](https://github.com/mikepenz/Android-Iconics) from 5.3.3 to 5.3.4.
- [Release notes](https://github.com/mikepenz/Android-Iconics/releases)
- [Changelog](https://github.com/mikepenz/Android-Iconics/blob/develop/gradle-release.gradle)
- [Commits](https://github.com/mikepenz/Android-Iconics/compare/v5.3.3...v5.3.4)

---
updated-dependencies:
- dependency-name: com.mikepenz:iconics-core
  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>
2022-06-26 18:33:12 +00:00
Joris Pelgröm
71b1fe1a00
Speed up device controls/Wear OS loading by doing network async (#2636)
* Speed up loading device controls by running network async

 - Speed up loading the device controls menu and initial controls by launching all requests in an async block, which allows the server to respond out of order
 - For individual controls, only start listening for changes once we have provided initial controls

* Speed up Wear OS cold boot by running network async

 - Speed up a cold boot of the Wear OS app by launching all network requests in an async block, which allows the server to respond out of order
2022-06-26 14:19:24 -04:00
leroyboerefijn
b261fe1fdf
Bump wear compose to 1.0.0-rc02 (#2633)
* Bump compose, make it build and update loading screen

* Fix toggle icons

* Update refresh interval picker layout

* Remove potential empty item in MainView to improve content alignment in window

* Fix rotary scroll

* Fix toggle icon in DetailsPanelView

* Stop using hardcoded strings...

* Bump to rc02

* Smoother rotary scrolling

* Revert "Smoother rotary scrolling"

This reverts commit e13738983d.

* Only show loading screen in one place to make sure we always see the same ui
2022-06-26 14:16:06 -04:00
leroyboerefijn
50d387a726
Entity state complication (#2574)
* 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
2022-06-20 20:24:37 -04:00
dependabot[bot]
e8fd1760f4
Bump okhttp from 4.9.3 to 4.10.0 (#2608)
Bumps [okhttp](https://github.com/square/okhttp) from 4.9.3 to 4.10.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.9.3...parent-4.10.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>
2022-06-14 13:52:56 +00:00
Joris Pelgröm
f8a3584054
Remove specific jackson-databind dependency (#2567) 2022-06-01 11:34:38 -04:00
dependabot[bot]
31ab4e822c
Bump jackson-module-kotlin from 2.13.2 to 2.13.3 (#2562)
Bumps [jackson-module-kotlin](https://github.com/FasterXML/jackson-module-kotlin) from 2.13.2 to 2.13.3.
- [Release notes](https://github.com/FasterXML/jackson-module-kotlin/releases)
- [Commits](https://github.com/FasterXML/jackson-module-kotlin/compare/jackson-module-kotlin-2.13.2...jackson-module-kotlin-2.13.3)

---
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>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-30 20:42:39 +00:00
dependabot[bot]
d62ae99b20
Bump kotlinx-coroutines-guava from 1.6.1 to 1.6.2 (#2560)
Bumps [kotlinx-coroutines-guava](https://github.com/Kotlin/kotlinx.coroutines) from 1.6.1 to 1.6.2.
- [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.1...1.6.2)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-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>
2022-05-30 20:19:14 +00:00
dependabot[bot]
0ef230a29c
Bump jackson-databind from 2.13.2.2 to 2.13.3 (#2561)
Bumps [jackson-databind](https://github.com/FasterXML/jackson) from 2.13.2.2 to 2.13.3.
- [Release notes](https://github.com/FasterXML/jackson/releases)
- [Commits](https://github.com/FasterXML/jackson/commits)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  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>
2022-05-30 20:18:38 +00:00
dependabot[bot]
78150f4fe0
Bump kotlinx-coroutines-android from 1.6.1 to 1.6.2 (#2559)
Bumps [kotlinx-coroutines-android](https://github.com/Kotlin/kotlinx.coroutines) from 1.6.1 to 1.6.2.
- [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.1...1.6.2)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-android
  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>
2022-05-30 20:07:31 +00:00
Justin Bassett
11868c185c
Dependency bumps. (#2556) 2022-05-30 15:40:54 -04:00
Tiger Oakes
f4375e4b72
Add dagger module for daos (#2541)
* Add dagger module for daos

* Update classes in common to inject daos

* Update app view models to use inject

* Use inject with widgets

* Update app activities and fragments to use inject

* Clean up imports

* Make TileExtensions use coroutines
2022-05-30 14:04:26 -04:00
Joris Pelgröm
c98b291d30
Sync sensor enabled state with core 2022.6+ (#2547)
* 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
2022-05-29 11:22:52 -04:00
Tiger Oakes
c532b74a94
Update compose items loops to use keys (#2544) 2022-05-29 10:32:20 -04:00
Joris Pelgröm
a06f96fd4d
Provide Compose preview for Play Store listing screens (#2542)
* Provide Compose preview for Play Store listing screens

* Update previews for onboarding

 - Set theme correctly and show system UI
 - Add variant for dark mode

* Update Wear OS listing image

* Remove specific icon, we can use domain default
2022-05-23 17:13:31 -04:00
Joris Pelgröm
f81989f78e
Hide hidden entities on Wear home screen (#2509) 2022-05-08 13:15:26 -04:00
Joris Pelgröm
1f95e6af87
Allow refreshing Wear template tile by tapping anywhere (#2508)
- The touch target for the refresh button is really small and there aren't any other conflicting actions, so allow tapping anywhere to refresh the content
2022-05-08 13:13:28 -04:00
Joris Pelgröm
f33743dc14
Fix crash on start app on SDK <26 (#2497)
- Manually specify databind version to fix https://github.com/FasterXML/jackson-databind/issues/3412, as the Kotlin module still depends on the unfixed version and hasn't had a new release yet
2022-05-01 14:32:00 -04:00
dependabot[bot]
ec6ae4345c
Bump kotlin-stdlib-jdk8 from 1.6.20 to 1.6.21 (#2467)
Bumps [kotlin-stdlib-jdk8](https://github.com/JetBrains/kotlin) from 1.6.20 to 1.6.21.
- [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-jdk8
  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>
2022-04-23 07:34:05 -04:00
Joris Pelgröm
fc8e961ef1
Add haptic + toast feedback to Wear OS details screen (#2455) 2022-04-23 07:16:21 -04:00
Tiger Oakes
3309c59bfd
Move SensorDao operations to Transactions (#2447)
* Add setSensorsEnabled helper

* Update SensorDetailViewModel

* Update sensormanager
2022-04-23 07:10:51 -04:00
dependabot[bot]
9ed331f9e7
Bump kotlinx-coroutines-android from 1.6.0 to 1.6.1 (#2451)
Bumps [kotlinx-coroutines-android](https://github.com/Kotlin/kotlinx.coroutines) from 1.6.0 to 1.6.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.0...1.6.1)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-android
  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>
2022-04-12 19:18:05 -04:00
dependabot[bot]
536139ab5e
Bump kotlin-stdlib-jdk8 from 1.6.10 to 1.6.20 (#2427)
Bumps [kotlin-stdlib-jdk8](https://github.com/JetBrains/kotlin) from 1.6.10 to 1.6.20.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.6.20/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.6.10...v1.6.20)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib-jdk8
  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>
2022-04-12 19:16:41 -04:00
dependabot[bot]
c14eb2d7c9
Bump kotlinx-coroutines-guava from 1.6.0 to 1.6.1 (#2431)
Bumps [kotlinx-coroutines-guava](https://github.com/Kotlin/kotlinx.coroutines) from 1.6.0 to 1.6.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.0...1.6.1)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-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>
2022-04-12 18:48:45 -04:00
Tiger Oakes
6c64b31f7e
Use collectAsState for SensorDao.getAllFlow (#2423) 2022-04-06 17:52:21 -04:00
Tiger Oakes
dbb1e8bf5d
Use suspend and transactions for Favorites dao (#2398) 2022-03-25 12:56:18 -04:00
Joris Pelgröm
81831a978e
Fix Wear default domain icon on shortcut tile (#2404)
- Fixes the default domain icon on shortcut tiles not working because of a missing ".", used an extension function to prevent this problem in the future
2022-03-25 12:51:58 -04:00
Joris Pelgröm
965ee61b11
Don't crash on sensor update on on/off/setting change (#2391)
* Don't crash on sensor update on on/off/setting change

* Update logging message, also for Wear OS
2022-03-22 20:17:17 -04:00
dependabot[bot]
e29dc0b66f
Bump jackson-module-kotlin from 2.13.1 to 2.13.2 (#2379)
Bumps [jackson-module-kotlin](https://github.com/FasterXML/jackson-module-kotlin) from 2.13.1 to 2.13.2.
- [Release notes](https://github.com/FasterXML/jackson-module-kotlin/releases)
- [Commits](https://github.com/FasterXML/jackson-module-kotlin/compare/jackson-module-kotlin-2.13.1...jackson-module-kotlin-2.13.2)

---
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>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-19 12:24:48 -04:00
Joris Pelgröm
b26928bbea
Update Kotlin to 1.6 and Compose to 1.1 (#2372)
* Update Kotlin to 1.6 and Compose to 1.1

 - Remove @ExperimantalComposeUiApi, @ExperimentalWearMaterialApi annotations (because the functions aren't experimental, we are just using an experimental API) and replace with an opt-in declaration at the 'lowest level' usage
 - Websocket: ProducerScope is no longer experimental so the annotation can be completely removed
 - Wear: the animation APIs that are used for the time text are no longer experimental so the annotation can be completely removed

* Update for Compose sensor settings merge
2022-03-15 10:15:14 -04:00
leroyboerefijn
261ae31fed
Add haptic feedback to templite tile refresh (#2349) 2022-03-07 21:59:17 -05:00
dependabot[bot]
ac5642a482
Bump guava from 31.0.1-android to 31.1-android (#2329)
Bumps [guava](https://github.com/google/guava) from 31.0.1-android to 31.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
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-03 18:56:43 -05:00
Joris Pelgröm
27b02a0be5
Add fan speed to Wear OS detail panel (#2332)
* Add fan speed detail panel to Wear OS

 - Added a fan speed slider for entities that support setting the fan speed
 - Adjust light brightness string to include percentage symbol

* Rename extension function
2022-03-03 18:55:16 -05:00
Joris Pelgröm
72a598fdbe
Add extensions to Entity for domain, lights features (#2322)
* Add extensions to Entity for domain, lights features

 - Add extension property for domain
 - Add extension functions for lights: support for setting brightness and color temperature

* Use domain extension property in more places
2022-02-26 17:34:29 -05:00
leroyboerefijn
9c5ced9963
Wear detail panel (#2288)
* Add details panel with light brightness/colortemp control

* Update InlineSlider icons

* Process review comments

* Update toggle placement and string formatting

* Fix last strings and use representative color for Color temperature bar
2022-02-23 08:04:43 -05:00
dependabot[bot]
7e3d5aa10d
Bump hilt-android-compiler from 2.40.5 to 2.41 (#2295)
Bumps [hilt-android-compiler](https://github.com/google/dagger) from 2.40.5 to 2.41.
- [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.40.5...dagger-2.41)

---
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>
2022-02-19 14:03:01 -05:00
dependabot[bot]
8af88297c1
Bump hilt-android from 2.40.5 to 2.41 (#2293)
Bumps [hilt-android](https://github.com/google/dagger) from 2.40.5 to 2.41.
- [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.40.5...dagger-2.41)

---
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>
2022-02-19 13:49:40 -05:00
Joris Pelgröm
83bdcfd245
Improve Wear OS error handling on home, check websocket connection state (#2261)
* Websocket: make connected Job Deferred to get errors

 - Switch the job used for monitoring whether a connection has been established to use Deferred, which will allow us to get the exception that caused the job to be cancelled (and also makes the code a little easier)

* Websocket: add variable for state

 - Add a variable to the websocket repository to monitor the state of the connection. This will allow the app to respond to handled exceptions.

* More Websocket race condition fixes

 - If multiple outgoing messages are pending before the connection is opened, if we receive an invalid auth message or onFailure callback this will be processed last. The connected job is still 'completed', so it shouldn't return true but return if it was successful. This will ensure that any messages after the first one that triggered the failure, will be ignored until the job is reset.
 - Set the connection state to authenticating before sending the message, to make sure that we don't accidentally override a very quick response

* Handle error states in HomeView

 - Add a state for the loading progress to the view model in order to be able to update the home view with errors if necessary
 - If loading the main data failed because of authentication, reset the session like in the phone app and send the user back to onboarding
 - Fix the app getting stuck on a loading screen, even if everything loaded correctly, if there are no supported entity domains in the response
2022-02-19 13:48:07 -05:00
Daniel Shokouhi
074c8aea43
Clean up old quest flavor code and hide some features from unsupported devices (#2265)
* Clean up old quest flavor code and hide some features from unsupported devices

* Check if device supports telephony for phone sesnors
2022-02-16 23:04:38 -05:00
Joris Pelgröm
4544c3473b
Wear use state and device class for entity icons (#2289)
* Use the same function to get icons everywhere

* Use state to determine entity icon
2022-02-16 22:45:24 -05:00
Timothy Kist
e21d095195
Wear OS sensors UI (#2033) 2022-02-16 20:43:23 -05:00
Joris Pelgröm
e7ebcff870
Support pressing (input_)buttons on Wear OS (#2229)
* Support button domain on Wear OS

* Support input_button domain on Wear OS
2022-02-02 21:12:13 -05:00
Joris Pelgröm
d2e944023e
Hide non-primary entities on Wear home screen (#2216) 2022-01-31 14:58:01 -05:00
Joris Pelgröm
9a753918c9
Allow toggling covers and fans on Wear OS (#2215)
* Allow toggling fans on Wear OS

* Allow toggling covers on Wear OS

* Update Wear phone settings to read supported domains

 - Updates the Wear settings in the phone app to read from the app which domains are supported, and use this for filtering the list
 - Add strings for cover and fan domains

* Fix shortcuts tile cover icon
2022-01-30 15:05:55 -05:00
Joris Pelgröm
2c55a3fd05
Bump and fix Android Gradle Plugin from 7.0.4 to 7.1.0 (#2203) 2022-01-26 21:07:55 -05:00
Daniel Shokouhi
b7f6a7322c
Bump app dependencies and fix wear rotary input (#2184)
* Bump app dependencies

* Rotary input fixes and improvement
2022-01-22 15:19:19 -05:00
Tiger Oakes
6bc0512064
Add helpers for duplicate Wear Compose code (#2175)
* Add ExpandableListHeader, rememberExpandedStates

* Add helper for ScalingLazyColumn

* Add helper for Chip in Settings

* Swap if statement
2022-01-21 21:06:20 -05:00
SkechyWolf
817af69069
Update Compose And Remove BackHandler (#2160) 2022-01-18 21:18:40 -05:00
Joris Pelgröm
e1e12dc2a2
Add 'Sign in on phone' button to Wear OS login (#2154)
* Add 'Sign in on phone' button to Wear OS login

 - Detects a compatible app and shows a button to sign in on your phone instead, which is a lot easier than typing everything on the watch

* Include exception for phone sign in in log
2022-01-18 16:40:17 -05:00
Joris Pelgröm
3e45d43ce0
Fix template tile refresh interval (#2151)
- The saved value is already in seconds, so there is no need to multiply it by 60
2022-01-17 20:14:29 -05:00
leroyboerefijn
131296ad01
Show names on shortcuts tile (#2142)
* Show names on shortcuts tile

* Reorganize shortcuts tile settings
2022-01-17 20:11:47 -05:00
Tiger Oakes
26f700bab2
Use getSystemService extension from Core KTX (#2136)
* Use getSystemService extension from Core KTX

* Replace deprecated bluetooth calls
2022-01-17 20:08:23 -05:00
Joris Pelgröm
050d449ef2
Support MFA during Wear OS standalone login (#2131)
* Initial Wear MFA support

 - Added support for authentication with MFA to the Wear OS login flow
 - Renamed the existing Authentication* stuff to PasswordAuthentication*
 - For the authentication flow, specify a base class used for responses and depending on the response return the appropriate data class that extends the base class

* Add MFA screens

  - Adjusting the existing view to add a new title and input and showing/hiding based on state created a buggy experience on the emulator where the keyboard confirm/next buttons didn't work properly any more, so the MFA input is a full new activity. Copied from the existing activity for username/password.

* Fix MFA activity tools:context

* Move MFA in to the existing AuthenticationActivity

 - Actually it is possible to get the MFA input in the same activity with a little effort, but the end result works great and doesn't use as much duplicate code

* Remove MFA activity, rename PasswordAuthentication* back

 - Remove the MFA activity now that MFA is integrated into the other activity for authentication
 - Rename back PasswordAuthentication* to Authentication* (end result compared to existing app: no change)

* Remove unnecessary JsonIgnoreProperties annotation
2022-01-17 20:01:57 -05:00
leroyboerefijn
3a15c0fb33
Template tile for wear OS (#2122)
* 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
2022-01-13 15:04:10 -05:00
Joris Pelgröm
4796284169
Add areas to entity list on Wear (#2118)
* 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)
2022-01-11 21:26:12 -05:00
zmarties
43b53923ab
Add a work profile sensor (#2026)
* 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
2021-12-31 07:53:07 -05:00
Daniel Shokouhi
02e4efeb9f
Catch the failure on devices without rotary input (#2092) 2021-12-31 07:41:34 -05:00
Justin Bassett
476bd8984a
Work on error handling from Websocket. (#2091)
* Work on error handling from Websocket.

* Fix wear build.
2021-12-30 15:55:35 -05:00
SkechyWolf
99a7ca1e56
Exit app when back is pressed on Screen_Landing (#2077)
* Exit app when back is pressed on Sreen_Landing

* Fix imports
2021-12-26 20:55:36 -05:00
dependabot[bot]
0f984e8b83
Bump kotlinx-coroutines-guava from 1.5.2 to 1.6.0 (#2071)
Bumps [kotlinx-coroutines-guava](https://github.com/Kotlin/kotlinx.coroutines) from 1.5.2 to 1.6.0.
- [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.5.2...1.6.0)

---
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>
2021-12-24 07:23:09 -05:00
dependabot[bot]
60d2cc140e
Bump kotlinx-coroutines-android from 1.5.2 to 1.6.0 (#2063)
Bumps [kotlinx-coroutines-android](https://github.com/Kotlin/kotlinx.coroutines) from 1.5.2 to 1.6.0.
- [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.5.2...1.6.0)

---
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>
2021-12-24 07:21:36 -05:00
Daniel Shokouhi
afa092b3c0
Bump dependencies and make required changes (#2030)
* Bump dependencies and make required changes

* Fix lint
2021-12-24 07:18:43 -05:00
SkechyWolf
6947db0878
Fix back button crash on Screen_Landing (#2052) 2021-12-21 21:25:24 -05:00
dependabot[bot]
84eea6967f
Bump jackson-module-kotlin from 2.13.0 to 2.13.1 (#2031)
Bumps [jackson-module-kotlin](https://github.com/FasterXML/jackson-module-kotlin) from 2.13.0 to 2.13.1.
- [Release notes](https://github.com/FasterXML/jackson-module-kotlin/releases)
- [Commits](https://github.com/FasterXML/jackson-module-kotlin/compare/jackson-module-kotlin-2.13.0...jackson-module-kotlin-2.13.1)

---
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>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-21 09:14:18 -05:00
SkechyWolf
9bd9ed4eb0
Add Back button support to Wear os (#2039) 2021-12-21 09:13:34 -05:00
dependabot[bot]
a4317af7df
Bump kotlin-stdlib-jdk8 from 1.6.0 to 1.6.10 (#2009)
Bumps [kotlin-stdlib-jdk8](https://github.com/JetBrains/kotlin) from 1.6.0 to 1.6.10.
- [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-jdk8
  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>
2021-12-14 11:05:00 -05:00
Daniel Shokouhi
55e5ae3597
Fix some sentry wear bugs and add some logs with a toast (#2007)
* Fix some sentry wear bugs and add some logs with a toast

* Review comments
2021-12-14 11:03:51 -05:00
Justin Bassett
8c5149ddcb
Allow Phone to Onboard Wear Device (#2002)
* 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.
2021-12-10 21:27:56 -05:00
dependabot[bot]
949aebe3d5
Bump hilt-android from 2.40.2 to 2.40.5 (#1993)
Bumps [hilt-android](https://github.com/google/dagger) from 2.40.2 to 2.40.5.
- [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.40.2...dagger-2.40.5)

---
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>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-08 20:57:55 -05:00
dependabot[bot]
278beeef58
Bump hilt-android-compiler from 2.40.2 to 2.40.5 (#1992)
Bumps [hilt-android-compiler](https://github.com/google/dagger) from 2.40.2 to 2.40.5.
- [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.40.2...dagger-2.40.5)

---
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>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-08 20:55:55 -05:00
Daniel Shokouhi
f800c85b52
Allow favorite entities to be dragged and dropped for reordering from phone settings (#1963)
* 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
2021-12-08 20:52:51 -05:00
leroyboerefijn
ab6cf02671
Wear redesign (#1970)
* 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
2021-11-29 21:04:58 -05:00
Justin Bassett
0555367c65
Move Strings to Common (#1971)
* Move all strings to common to make translations easier.

* Update lokalise github action.
2021-11-27 20:34:04 -05:00
dependabot[bot]
ded624d1a0
Bump hilt-android from 2.40.1 to 2.40.2 (#1965)
* Bump hilt-android-gradle-plugin from 2.40.1 to 2.40.2

Bumps [hilt-android-gradle-plugin](https://github.com/google/dagger) from 2.40.1 to 2.40.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.40.1...dagger-2.40.2)

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

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

* Bump hilt-android from 2.40.1 to 2.40.2

Bumps [hilt-android](https://github.com/google/dagger) from 2.40.1 to 2.40.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.40.1...dagger-2.40.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>

* Bump hilt-android-compiler from 2.40.1 to 2.40.2

Bumps [hilt-android-compiler](https://github.com/google/dagger) from 2.40.1 to 2.40.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.40.1...dagger-2.40.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>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Justin Bassett <bassett.justint@gmail.com>
2021-11-27 14:34:58 -05:00
leroyboerefijn
31d07bbbeb
Wear os add lock domain (#1959)
* 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.
2021-11-27 13:09:43 -05:00
Timothy Kist
a42cb8ab05
Add Wear OS battery sensors (#1890)
* 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
2021-11-27 13:08:26 -05:00
Daniel Shokouhi
a88704ae24
Editing wear favorites from the phone (#1908)
* 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
2021-11-22 20:51:48 -05:00
leroyboerefijn
ca52af740c
Add haptic feedback to shortcut tile (#1960) 2021-11-22 20:35:57 -05:00
dependabot[bot]
aa180a8fc3
Bump okhttp from 4.9.2 to 4.9.3 (#1952)
Bumps [okhttp](https://github.com/square/okhttp) from 4.9.2 to 4.9.3.
- [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.9.2...parent-4.9.3)

---
updated-dependencies:
- dependency-name: com.squareup.okhttp3:okhttp
  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>
2021-11-22 20:34:52 -05:00
Daniel Shokouhi
65d6d7d270
Fix default icon for shortcut tile (#1951) 2021-11-22 20:34:17 -05:00
Daniel Shokouhi
d907948512
Bump wear libraries (#1946) 2021-11-20 15:50:44 -05:00
SkechyWolf
b87f239f19
Change splash screen icon (#1909) 2021-11-18 20:56:31 -05:00
Justin Bassett
672e49b6fb
Hilt Upgrade (#1933)
* Onboarding and webview work with Hilt!

* App fully on Hilt, next up Wear OS!

* Wear now on Hilt.

* Upgrade hilt.
Fix lint errors.
2021-11-16 11:06:19 -05:00
dependabot[bot]
912ae9605b
Bump dagger-compiler from 2.40 to 2.40.1 (#1929)
Bumps [dagger-compiler](https://github.com/google/dagger) from 2.40 to 2.40.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.40...dagger-2.40.1)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger-compiler
  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>
2021-11-15 18:04:51 -05:00
dependabot[bot]
b88d7f6830
Bump community-material-typeface from 5.8.55.0-kotlin to 6.4.95.0-kotlin (#1930)
Bumps [community-material-typeface](https://github.com/mikepenz/Android-Iconics) from 5.8.55.0-kotlin to 6.4.95.0-kotlin.
- [Release notes](https://github.com/mikepenz/Android-Iconics/releases)
- [Changelog](https://github.com/mikepenz/Android-Iconics/blob/develop/gradle-release.gradle)
- [Commits](https://github.com/mikepenz/Android-Iconics/commits)

---
updated-dependencies:
- dependency-name: com.mikepenz:community-material-typeface
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-15 18:04:08 -05:00
dependabot[bot]
06926ffd38
Bump dagger from 2.40 to 2.40.1 (#1927)
Bumps [dagger](https://github.com/google/dagger) from 2.40 to 2.40.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.40...dagger-2.40.1)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger
  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>
2021-11-15 18:03:10 -05:00
dependabot[bot]
ef5f033d76
Bump iconics-compose from 5.3.2 to 5.3.3 (#1928)
Bumps [iconics-compose](https://github.com/mikepenz/Android-Iconics) from 5.3.2 to 5.3.3.
- [Release notes](https://github.com/mikepenz/Android-Iconics/releases)
- [Changelog](https://github.com/mikepenz/Android-Iconics/blob/develop/gradle-release.gradle)
- [Commits](https://github.com/mikepenz/Android-Iconics/compare/v5.3.2...v5.3.3)

---
updated-dependencies:
- dependency-name: com.mikepenz:iconics-compose
  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>
2021-11-15 17:47:36 -05:00
leroyboerefijn
c22e078559
Fix default icon and move to broadcast receiver (#1926) 2021-11-15 17:41:43 -05:00
dependabot[bot]
576518e32f
Bump kotlinx-coroutines-guava from 1.5.1 to 1.5.2 (#1923)
Bumps [kotlinx-coroutines-guava](https://github.com/Kotlin/kotlinx.coroutines) from 1.5.1 to 1.5.2.
- [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.5.1...1.5.2)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-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>
2021-11-15 17:36:52 -05:00
dependabot[bot]
c0920928fd
Bump iconics-core from 5.3.2 to 5.3.3 (#1921)
Bumps [iconics-core](https://github.com/mikepenz/Android-Iconics) from 5.3.2 to 5.3.3.
- [Release notes](https://github.com/mikepenz/Android-Iconics/releases)
- [Changelog](https://github.com/mikepenz/Android-Iconics/blob/develop/gradle-release.gradle)
- [Commits](https://github.com/mikepenz/Android-Iconics/compare/v5.3.2...v5.3.3)

---
updated-dependencies:
- dependency-name: com.mikepenz:iconics-core
  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>
2021-11-15 17:34:35 -05:00
Daniel Shokouhi
e2e361930d
Add sorting, split by category, add collapsing categories (#1919) 2021-11-14 14:11:34 -05:00
Daniel Shokouhi
fe3bbdf112
Sort entities, add time and headers in wear settings (#1912)
* Sort entities, add time and headers in wear settings

* Review comment
2021-11-14 11:24:12 -05:00
Justin Bassett
1e5534de68
Wear OS Instant Updates (#1907)
* Migrate to maps for entities to make life easier.

* Websocket all the things!
2021-11-11 16:56:45 -05:00
leroyboerefijn
3d909c621d
Wear OS shortcut Tile (#1842)
* 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>
2021-11-11 16:09:32 -05:00
Daniel Shokouhi
27627fad49
Add settings for wear haptic feedback and toast on entity selection (#1893)
* Add settings for wear haptic feedback and toast on entity selection

* Lint

* Implement review suggestions.

* Add preview functions for easy UI viewing in Android Studio (#1901)

* Add settings for wear haptic feedback and toast on entity selection

* Merge in review fixes

* Lint

* Remove duplicate calls

Co-authored-by: Justin Bassett <bassett.justint@gmail.com>
2021-11-11 12:48:11 -05:00
Daniel Shokouhi
b060f0c7f4
Add preview functions for easy UI viewing in Android Studio (#1901) 2021-11-11 11:16:49 -05:00
Daniel Shokouhi
f419778e80
Load a temporary favorite chip for each entity ID until we get entities (#1899)
* Load a temporary favorite chip for each entity ID until we get entities

* Lint
2021-11-10 23:07:16 -05:00
Daniel Shokouhi
894a3e8a1d
Add the time, make better use of list headers on Wear (#1900) 2021-11-10 22:03:11 -05:00
HunterX86
705a974c95
Fixing splash screen (#1896)
Changed splash logo and accent color
2021-11-10 21:37:01 -05:00
Justin Bassett
4fdbe7214a
Major Wear Cleanup (#1895)
* 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.
2021-11-10 09:35:10 -05:00
SkechyWolf
eb3585b305
Fixing Splash screen so it isn't blurry and adding rounded edges (#1894)
* Fixing Splash screen so it isn't blurry and adding roundness

* Fixes filename mistake
2021-11-09 23:44:53 -05:00
Justin Bassett
ba8345a3cf
Initial WebSocket Implementation (#1884)
* 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.
2021-11-09 20:44:05 -05:00
Daniel Shokouhi
86c12799e7
Allow categories in Wear to be collapsed and expanded for easier navigation (#1886)
* Allow categories in Wear to be collapsed and expanded for easier navigation

* Small tweak
2021-11-09 15:46:38 -05:00
Daniel Shokouhi
2999d220a8
Add a splash screen to Wear to improve cold start experience (#1889) 2021-11-09 09:47:25 -05:00
Daniel Shokouhi
2c5e762504
Add settings and favorites for wear so users can quickly execute actions they do regularly faster (#1875)
* 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
2021-11-09 09:41:23 -05:00
Daniel Shokouhi
588e74113d
Bring back rotary input support for home screen (#1887) 2021-11-07 21:32:06 -05:00
Daniel Shokouhi
4e3d8ce852
Add a short delay and update entities again on wear homescreen (#1870) 2021-11-03 23:09:45 -04:00
Tiger Oakes
5f87d10846
Replace kotlinx.android.synthetic with viewbinding (#1840)
* Replace kotlinx.android.synthetic with viewbinding

* Remove kotlin-android-extensions

* Replace findViewById calls with viewbinding
2021-11-03 23:01:46 -04:00
Daniel Shokouhi
8aee9d11b1
Move entities call back to presenter, use ToggleChip for toggle domains (#1868)
* Move entities call back to presenter, use ToggleChip for toggle domains

* Bump compose libraries and minor cleanup

* Review comments
2021-11-03 21:42:30 -04:00
dependabot[bot]
6c1f1f3e0c
Bump dagger-compiler from 2.39.1 to 2.40 (#1861)
Bumps [dagger-compiler](https://github.com/google/dagger) from 2.39.1 to 2.40.
- [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.39.1...dagger-2.40)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger-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>
2021-11-02 21:08:18 -04:00
dependabot[bot]
b36cc0a5a3
Bump dagger from 2.39.1 to 2.40 (#1860)
Bumps [dagger](https://github.com/google/dagger) from 2.39.1 to 2.40.
- [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.39.1...dagger-2.40)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger
  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>
2021-11-02 20:58:22 -04:00
Daniel Shokouhi
b6e0837cc4
Convert wear home activity to compose (#1844)
* 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
2021-11-02 20:52:28 -04:00
Daniel Shokouhi
e3cc165c79
Only load MDI icons on wear, otherwise load default (#1816)
* Only load MDI icons on wear, otherwise load default

* Combine conditions

* Update wear/src/main/java/io/homeassistant/companion/android/viewHolders/EntityButtonViewHolder.kt

Co-authored-by: Justin Bassett <bassett.justint@gmail.com>

Co-authored-by: Justin Bassett <bassett.justint@gmail.com>
2021-10-21 00:39:43 -04:00
Daniel Shokouhi
f7883bebc5
Add Wear OS Settings section (#1796)
* 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
2021-10-20 22:34:29 -04:00
leroyboerefijn
652b8eb576
Support custom icons (#1799) 2021-10-20 17:52:58 -04:00
Daniel Shokouhi
b8994b744d
Some fixes for empty entity lists in wear (#1789)
* Some fixes for empty entity lists in wear

* Review comments
2021-10-18 15:08:46 -04:00
Daniel Shokouhi
9f3f552155
Add auto back up rules for wear (#1790) 2021-10-15 20:47:56 -04:00
Daniel Shokouhi
fc8f10afbc
Add network security config for wear app (#1787) 2021-10-15 07:14:49 -05:00
apo-mak
7a026c4f53
Wear - add Lights (#1783)
* add lights entity

* implement filter from 9891c92d01
code clean up.

* Add On/Off Logic (if state)

* fix code ktlint base on https://github.com/home-assistant/android/pull/1783/checks?check_run_id=3894949865

* fix code ktlint base on https://github.com/home-assistant/android/pull/1783/checks?check_run_id=3894949865

* remove "if state" and add "callService toggle"

* remove "if state" and add "callService toggle"
2021-10-14 21:29:31 -04:00
Bassett, Justin
cbf217c51a Try something else for publishing. 2021-10-13 23:46:49 -04:00
Justin Bassett
23329d90cb
Make sure to only commit once: https://github.com/Triple-T/gradle-play-publisher/issues/217 (#1781) 2021-10-13 23:17:32 -04:00
Justin Bassett
8fbc55e97b
Enable publishing the Wear OS to Beta. (#1772)
* Enable publishing the Wear OS to Beta.

* Make versionCode different for wear app.
2021-10-13 22:42:23 -04:00
Justin Bassett
51df8dd9a8
Dependency upgrades (#1775)
* Dependency upgrades

* Upgrade compile sdk.
2021-10-13 20:58:14 -04:00
apo-mak
f51d7ef92c
add focus,for rotary input (#1780)
add focus,for rotary input.
#1779
2021-10-13 20:55:55 -04:00
Daniel Shokouhi
4893a293bb
Sort entity list and add debug resources for wear app (#1778) 2021-10-13 20:55:37 -04:00
Justin Bassett
1eb826cbcc
Cleanup deprecated build files. (#1774)
* Cleanup deprecated build files.

* ktlint
2021-10-12 23:35:05 -04:00
leroyboerefijn
1573c2e796
Wear os scenes and scripts support (#1763)
* Implement scenes in home activity as a clickable list

* Add ripple effect to list items

* Add scripts as well
2021-10-12 22:30:40 -04:00
dependabot[bot]
0841dd5d94
Bump dagger-compiler from 2.39 to 2.39.1 (#1752)
Bumps [dagger-compiler](https://github.com/google/dagger) from 2.39 to 2.39.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.39...dagger-2.39.1)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger-compiler
  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>
2021-10-07 18:32:43 -04:00
dependabot[bot]
4cb5f5d679
Bump dagger from 2.39 to 2.39.1 (#1751)
Bumps [dagger](https://github.com/google/dagger) from 2.39 to 2.39.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.39...dagger-2.39.1)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger
  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>
2021-10-07 18:25:13 -04:00
dependabot[bot]
7fd58a9b70
Bump dagger from 2.38.1 to 2.39 (#1736)
Bumps [dagger](https://github.com/google/dagger) from 2.38.1 to 2.39.
- [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.38.1...dagger-2.39)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger
  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>
2021-09-30 21:46:02 -04:00
dependabot[bot]
59ecaba7c2
Bump dagger-compiler from 2.38.1 to 2.39 (#1735)
Bumps [dagger-compiler](https://github.com/google/dagger) from 2.38.1 to 2.39.
- [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.38.1...dagger-2.39)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger-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>
2021-09-30 21:38:34 -04:00
leroyboerefijn
5f904b980e
Wear os authentication (#1691)
* 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
2021-09-30 20:41:22 -04:00
Justin Bassett
2da4578f79
Update to use latest Android Gradle Plugin. (#1655)
* 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.
2021-08-06 21:41:30 -04:00
Justin Bassett
c5ebd99a48
Dependency Updates. (#1643)
* Dependency Updates.
Needed to correctly call for Firebase Token in ioScope not main.

* Bump coroutines test dep as well.
2021-07-25 20:56:58 -04:00
Justin Bassett
151957436c
Fix Playstore Publish and add Dependabot (#1621)
* Fix GPP error and remove deprecated repos.

* Migrate off Config.kt so we can enable dependabot.

* Add Dependabot config.
2021-07-25 15:33:59 -04:00
Nelson Osacky
89457c5fe0
Bump AGP, Gradle and Kotlin Versions (#1563) 2021-06-08 14:58:50 -04:00
Justin Bassett
3b614548d6
Feature/wear publishing (#1264)
* Cleanup .gitignore

* Move to just wear rather than wearos_app.

* Try to use lots of wildcards for debug pr build archiving.
2020-12-27 22:04:37 -05:00