Commit graph

1317 commits

Author SHA1 Message Date
Justin Bassett 1adc33bf61
Bump Hilt version to 2.44 (#2939)
Bump hilt version to 2.44
2022-10-01 17:12:32 -04:00
dependabot[bot] b2b976b3d6
Bump actions/setup-java from 3.5.0 to 3.5.1 (#2925)
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3.5.0 to 3.5.1.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v3.5.0...v3.5.1)

---
updated-dependencies:
- dependency-name: actions/setup-java
  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-10-01 16:16:07 -04:00
Daniel Shokouhi 48f2ca3125
Default to app icon if icon is not available for notification (#2936) 2022-10-01 16:15:24 -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
Chris Kemp 203e6868d1
Add new force_on and force_off options to command_high_accuracy_mode. (#2924) 2022-10-01 16:12:44 -04:00
Joris Pelgröm c2937e77aa
Simplify themes (#2923)
* Merge Follow Home Assistant/Follow System Settings theme

 - As these two themes behave the same now, don't present two options but instead just one. The default setting has been renamed back to "Follow System Settings" to best match expectations. Internally the "android" setting still works, settings will show "Not set".

* Remove useless webview force dark

 - The WebView force dark settings are no longer required (and will no longer be supported when targeting Android 13), as the latest appcompat/webview/HA frontend already respect the app's theme setting and allow overriding it
2022-10-01 16:11:31 -04:00
Daniel Shokouhi 60aadc906a
Show custom icon if set for the entity in device controls (#2922)
* Add support for showing custom icons in device controls

* Clean up and set color based on state

* Set icon size and adjust colors based on domain

* Move color values to resources and add more color options from source

* Review comments

* Only set the icon if it exists in the library
2022-10-01 16:10:52 -04:00
Joris Pelgröm ceac76cd9c
Fix websocket subscription race/dropping first message (#2902)
* Fix websocket subscription race/dropping first message

 - Fixes a race condition in the websocket repository for subscriptions, where the first message in a subscription might be dropped because the Flow + ProducerScope that handle the message weren't set up until after the subscription confirmation was received.
 - Inspired by home-assistant-js-websocket, make sure the response + subscription handlers are set up immediately after _sending_ the initial message. To make sure no messages are dropped, it'll now use a Channel to buffer event messages while not yet ready to receive them. The Channel will be collected inside the existing Flow that is only active while there are subscribers.
 - Send unsubscribe when receiving events for a subscription that isn't handled by the app.

* Fix websocket notifications causing unsubscribe
2022-10-01 16:09:59 -04:00
Daniel Shokouhi 1a5776371e
Add commands to control screen brightness and a sensor to get its value (#2894)
* Add commands to control screen brightness and a sensor to get the value

* Minor file clean up

* Review comments

* Rename Device Settings to Display Sensors
2022-10-01 16:09:01 -04:00
Daniel Shokouhi 070a839b74
Update iBeacon format to have underscores (#2930)
* Update iBeacon format to have underscores

* Update change log
2022-10-01 19:57:01 +00:00
Daniel Shokouhi 79802c18a8
Update change log week of 10/1 (#2937) 2022-10-01 19:38:03 +00:00
Daniel Shokouhi cabd41e6d5
Breaking Change: Only update geocoded sensor with location if the setting is turned on (#2913)
* Add a setting to control if the geocoded sensor should update with device tracker

* Update strings for settings
2022-09-26 10:55:02 -04:00
Daniel Shokouhi 113582ad2d
Update change log week of 9/24 (#2914) 2022-09-26 10:54:05 -04:00
Daniel Shokouhi fbe300e30b
Breaking Change: Add bluetooth connect permission to beacon monitor to prevent log spam from library (#2920)
Add bluetooth connect permission to beacon monitor to prevent log spam from library
2022-09-26 10:53:42 -04:00
Joris Pelgröm db98a7ced3
Fix BLE monitor new beacon check (#2918) 2022-09-26 10:52:28 -04:00
Daniel Shokouhi e541db2ca8
Only check for beacons if the index is present (#2916)
* Only check for beacons if the index is present

* Remove assert

* Review comment
2022-09-26 10:52:08 -04:00
dependabot[bot] 1449ff5409
Bump sentry-android from 6.4.1 to 6.4.2 (#2898)
Bumps [sentry-android](https://github.com/getsentry/sentry-java) from 6.4.1 to 6.4.2.
- [Release notes](https://github.com/getsentry/sentry-java/releases)
- [Changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-java/compare/6.4.1...6.4.2)

---
updated-dependencies:
- dependency-name: io.sentry:sentry-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-09-24 20:19:34 +00:00
dependabot[bot] d464f17265
Bump google-services from 4.3.13 to 4.3.14 (#2887)
Bumps google-services from 4.3.13 to 4.3.14.

---
updated-dependencies:
- dependency-name: com.google.gms:google-services
  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-24 16:06:29 -04:00
Joris Pelgröm 0222d6b673
Bump Google dependencies (#2910) 2022-09-24 16:04:58 -04:00
Daniel Shokouhi 603e411823
Breaking Change: Add major and minor to UUID for beacon attribute in beacon monitor (#2909)
* Add major and minor to UUID for beacon attribute

* Review comments
2022-09-24 16:04:31 -04:00
Daniel Shokouhi 7c6096634f
Allow custom intents register for categories in case they are required (#2901)
* Allow custom intents register for categories in case they are required

* Update description

* Update string to be more generalized and readable
2022-09-24 16:03:32 -04:00
Joris Pelgröm 2f552ca4c1
Fix another race condition in websocket unsubscribe/resubscribe (#2892)
- If the app checked for an active subscription right in between removing the flow and removing the subscription ID, this could result in an invalid state. To prevent this, use the same mutex that is used when obtaining the subscription when unsubscribing so that it is either completely removed or not removed at all.
 - Remove non-null assertion !! for the returned flow, at this point it is better to return an empty flow than to crash.
2022-09-24 16:01:47 -04:00
Daniel Shokouhi 91a4b02500
Change TTS error message and clean up some other strings (#2890) 2022-09-24 16:01:20 -04:00
Daniel Shokouhi 2e19dc4474
Add support for intent scheme URI and deep links in clickAction and actionable notifications (#2888)
* Add support for intent scheme URI in clickAction and actionable notifications

* Add a new prefix for app links in actions

* Rename app link to deep link to be more precise

* Use correct intent prefix

* Take user to the play store if the app is not installed

* Fix taking user to the market if app is missing, remove ability for deep links since we can't get the package name

* Only open the play store if we have an actual package to open to
2022-09-24 16:00:29 -04:00
Daniel Shokouhi 763819746a
Add a dynamic color sensor for accent color (#2884)
* Add a dynamic color sensor for accent color

* Update colors to color to match material design label
2022-09-24 15:56:10 -04:00
Joris Pelgröm 80816df6f5
Add support for using BSSIDs for internal connection (#2883)
* Add support for using BSSIDs for internal connection

 - Add support for entering BSSIDs to use for detecting when the internal connection URL should be used. These are saved like any regular SSID, but contain the prefix "BSSID:".

* Add link to documentation
2022-09-24 15:55:36 -04:00
Daniel Shokouhi 9fa983c6dc
Fix full screen mode for all devices (#2878)
* Fix full screen mode for all devices

* Hide system UI when we regain focus and a video is still full screen

* Revert theme changes

* Remove unneeded line break
2022-09-24 15:54:38 -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
Daniel Shokouhi d87781dea4
Breaking Change: Only send notification received event if a notification wants the confirmation (#2899)
* Breaking Change: Only send notification received event if a notification wants the confirmation

* Update change log
2022-09-20 19:48:51 +00:00
dependabot[bot] 8713bb9678
Bump actions/setup-java from 3.4.1 to 3.5.0 (#2869)
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3.4.1 to 3.5.0.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v3.4.1...v3.5.0)

---
updated-dependencies:
- dependency-name: actions/setup-java
  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-09-10 19:34:35 +00:00
Daniel Shokouhi a34487409c
Update change log week of 9/2 (#2842)
* Update change log week of 9/2

* Reduce description as docs also mention the rate limit

* Add more changes from recent merges
2022-09-10 12:33:52 -07:00
Daniel Shokouhi 0ce8cbe871
Add item ID to active notification attributes to keep them unique (#2856) 2022-09-10 15:22:11 -04:00
Joris Pelgröm 6a0ffd82b1
Tweak camera control active state: true if not unavailable (#2871)
- Set the thumbnail template for the camera control to active as long as the camera isn't unavailable and the app was able to download an image, to show the camera image more often and better match the frontend.
2022-09-10 15:18:45 -04:00
Joris Pelgröm 6756e21112
Fix template widgets that render null in websocket subscription (#2866)
Fix widgets that return null in websocket subscription

 - Just like in the preview, null is a valid result and should be handled by the app
2022-09-10 15:18:10 -04:00
Joris Pelgröm a31afb3455
Only subscribe to state changes for added controls (#2864)
- Instead of receiving all state changes when the device controls are open, only receive state changes for entities that were added as controls. This potentially reduces the amount of data used while controls are open.
2022-09-10 15:17:49 -04: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
Joris Pelgröm bdc9094845
Improve adding quick settings tile (#2860)
* Improve adding quick settings tiles

 - Use the new option available on Android 13 to prompt the user to add a tile to the quick settings panel, if a tile wasn't already added
 - Switch Toast to Snackbar
 - Move some logic from the manage tiles view to viewmodel

* Only show subtitle field when supported

 - Setting a tile subtitle is only supported on Android Q+, so don't show the field on versions before that!

* Deeplink into app for tiles that aren't setup

 - Instead of disabling a tile if it isn't setup, if the user is logged in set it up as inactive with the default icon/label and deeplink into the app settings with a notice that it needs to be setup first. This provides a better first use experience, as the user can simply tap it to setup instead of requiring them to manually go to the settings.
2022-09-10 15:16:36 -04:00
Joris Pelgröm 45cdaeb764
Fix race condition in websocket unsubscribe/resubscribe (#2855)
- If the app tries to start a new websocket subscription before the last one was properly unsubscribed, the app will return a flow that is null and crash. To prevent this, change the unsubscribe logic to immediately remove the subscription ID - the confirmation isn't used. This will allow the app to start a new subscription and create a new flow even if the previous unsubscribe hasn't yet fully finished (which is OK).
2022-09-05 18:05:28 -04:00
Joris Pelgröm b2ff51f0c1
Fix entity registry change type / crash (#2854)
Fix entity registry change type

 - This isn't always a string but can also be an object or map
2022-09-05 18:04:44 -04:00
Daniel Shokouhi 5cad75d1eb
Add a setting to battery power sensor to convert current when it is not in microamps (#2848) 2022-09-05 15:42:13 +00: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
Daniel Shokouhi dab3640c6b
Fix sensorDao not initialized error after geocoded update (#2772)
* Fix sensorDao not initialized error after geocoded update

* Switch to sending an intent to update the sensor

* Review comments
2022-09-05 10:11:38 -04:00
Adrian Huber d0016e530e
Add Beacon Monitor (#2472)
* Add BLE Beacon Monitoring Sensor

* Fix on/off toggle

* Add on/off commands

* Fix commands

* Add all beacons to attributtes

* Add Kalman Filter

* Improve performance

* More settings

* cleanup

* Fix linter errors

* Update description

* Show monitoring state in sensor

* Add missing permissions

* Fix permissions

* Fix Bluetooth state of Android 12

* Use instance instead of singelton

* Use runBlocking for updateLastSendState

* Use own scope for beacon manager

* Use new notification commands

* fix rebase

* use null instead of empty string

* return if sensor is disabled
2022-09-05 10:07:26 -04:00
dependabot[bot] 647d6c4533
Bump sentry-android from 6.4.0 to 6.4.1 (#2836)
Bumps [sentry-android](https://github.com/getsentry/sentry-java) from 6.4.0 to 6.4.1.
- [Release notes](https://github.com/getsentry/sentry-java/releases)
- [Changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-java/compare/6.4.0...6.4.1)

---
updated-dependencies:
- dependency-name: io.sentry:sentry-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-09-05 10:05:33 -04:00
Joris Pelgröm e31ec2f731
Send external url to Wear discovery (#2839) 2022-09-05 10:05:04 -04:00
leroyboerefijn 3926a04e21
Update companion settings landing page for Wear settings (#2837)
* Update companion settings landing page for Wear settings

* Fix description

* Update text and label
2022-09-05 10:04:26 -04:00
Joris Pelgröm 567e286bfa
Fix media notification command (#2835)
Fix media command

 - Fixes the media command code using 'command' to check if it is included but 'media_command' to do the actual command
2022-09-05 10:00:08 -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 232fbb2b2d
Better state change subscriptions in entity state and media player widgets (#2814)
Implement subscribe_trigger and use it in widgets

 - Implement support for subscribing using subscribe_trigger, currently used to get state changes only for specific entities
 - Change the entity state and media player widgets to use this new subscription instead of subscribing to all state changes, based on the template widget
 - Removed some placeholder code from media player widget
2022-09-05 09:56:44 -04:00