Commit Graph

524 Commits

Author SHA1 Message Date
0feecde178 165 templating content for all types (#170)
Submitting as an initial draft in order to guage feedback on the style.
In particular the solution to adding the code to the `toggle` menu item,
which has incurred duplication of code as I can't inherit from two
classes.
2024-08-26 19:42:51 +01:00
e9a0c5d137 Single request to update 2024-08-26 18:59:17 +01:00
d387152593 Restyle 165 templating content for all types (#171)
Automated style fixes for #170, created by [Restyled][].

The following restylers [made
fixes](https://restyled.io/gh/house-of-abbey/repos/GarminHomeAssistant/jobs/4738467):

- [jq](https://stedolan.github.io/jq/)
- [prettier-json](https://prettier.io/docs/en/options.html#parser)
-
[whitespace](https://github.com/restyled-io/restyler-whitespace/blob/master/README.md)


To incorporate these changes, merge this Pull Request into the original.
We
recommend using the Squash or Rebase strategies.


**NOTE**: As work continues on the original Pull Request, this process
will
re-run and update (force-push) this Pull Request with updated style
fixes as
necessary. If the style is fixed manually at any point (i.e. this
process finds
no fixes to make), this Pull Request will be closed automatically.

Sorry if this was unexpected. To disable it, see our [documentation][].

[restyled]: https://restyled.io
[documentation]:
https://github.com/restyled-io/restyled.io/wiki/Disabling-Restyled
2024-08-25 19:47:20 +01:00
2ea349bfda Merge branch 'main' into 165-templating-content-for-all-types 2024-08-25 19:44:58 +01:00
a35798f9d3 Restyled by whitespace 2024-08-25 18:42:34 +00:00
4707f1ea9e Restyled by prettier-json 2024-08-25 18:42:33 +00:00
3424576027 Restyled by jq 2024-08-25 18:42:32 +00:00
1846d682f7 Update HISTORY.md
v2.18 text line amended.
2024-08-25 19:39:27 +01:00
685cda7924 Added template option to toggle menu items 2024-08-25 19:34:29 +01:00
72e825566c Update TemplateMenuItem.mc
Fixed System.println() calls.
2024-08-25 19:33:33 +01:00
1dc95eeac7 Added callback function to TemplateMenuItem 2024-08-25 18:53:32 +01:00
08829dac1f Update export.cmd
Trivial update to give the cmd.exe a title.
v2.18
2024-08-25 16:50:08 +01:00
ca6e0733c5 Added null checking to activity stats (#169)
Position.getInfo().* might return null sometimes, so best check and
avoid a numerical error.

@KPWhiver My co-author is away presently, would you mind giving this
simple change the once over? Thanks!
2024-08-25 16:15:01 +01:00
01f073e67b Update BackgroundServiceDelegate.mc
Only submitting non-null values to HA, not fake zeros for null values.
2024-08-25 13:50:29 +01:00
64a9c5f274 Added null checking to activity stats
Position.getInfo().* might return null sometimes, so best check and avoid a numerical error.
2024-08-25 13:07:23 +01:00
ea32d71a2b Added templates to group items 2024-08-24 18:31:47 +01:00
f2fb7f65a0 Merge branch 'main' of https://github.com/house-of-abbey/GarminHomeAssistant v2.17 2024-08-24 14:30:44 +01:00
1e103069bc Update README.md
Feature differences between Application and Widget.
2024-08-24 14:30:23 +01:00
520309729d Bug fix for activity reporting (#167)
Added 'has' clauses around additional ActivityMonitor.Info fields that
are not present on all devices. I have also checked the other reporting
fields to ensure they are not device dependent.
2024-08-24 14:26:54 +01:00
d2aec16811 Update BackgroundServiceDelegate.mc
Failed to make commensurate changes to the background service code.
2024-08-24 14:21:02 +01:00
a424e35784 Update WebhookManager.mc
Returned internationalized string for unavailable to "unknown" as per review comments advice.
2024-08-24 13:58:47 +01:00
5558e25bda Bug fix for activity reporting
Added 'has' clauses around additional ActivityMonitor.Info fields that are not present on all devices.
2024-08-24 12:28:54 +01:00
769731bff2 Send heartrate, floor, and respiration rate values to Home Assistant (#162)
This change sends the heartrate, respiration rate, stepcount, and floors
climbed/descended to Home Assistant as mobile app entities. There are a
lot more sensors that could potentially be added.

I have only tested this on a Vivoactive 4s as that is the only device I
own.

Let me know what you think and if there are any changes you would like
to see.
v2.16
2024-08-20 09:01:00 +01:00
2c56155593 Merge branch 'main' into more-mobile-app-sensors
Signed-off-by: Philip Abbey <philipabbey@users.noreply.github.com>
2024-08-19 12:36:33 +01:00
c38f91f456 Fixed merge conflict
Fixed a merge conflict made by more recent changes to fix a bug (https://github.com/house-of-abbey/GarminHomeAssistant/pull/164)
2024-08-19 12:33:23 +01:00
94d806c4d3 163 application crashes when started out of bluetooth range (#164)
Test the phone is connected before attempting WebHook HTTP requests.
2024-08-18 14:15:52 +01:00
51081ee2e6 Update HISTORY.md
Added v2.16
2024-08-18 13:03:30 +01:00
7c7130367f Update Settings.mc
Rearranged 'else' clauses.
2024-08-18 12:26:45 +01:00
42d1a7233c Update Settings.mc
Test the phone is connected before attempting WebHook HTTP requests.
2024-08-18 12:04:34 +01:00
43378bfe8c Set icons for sent sensor values 2024-08-05 19:34:26 +02:00
700e7ca822 Send heartrate, floor, and respiration rate values to Home Assistant 2024-08-05 18:02:37 +02:00
19642c6679 Update HomeAssistantTemplateMenuItem.mc (#158)
Template errors now displayed per item.
v2.15
2024-07-26 18:37:27 +00:00
a213c6851e Largely cosmetic
Removed debug that escaped.
Belt & braces field to prevent the update chain being started twice.
2024-07-26 18:23:22 +01:00
9eed5affdc Update HomeAssistantApp.mc
Guard against dereferencing null. Belt & braces, as this has not been an issue.
2024-07-26 17:16:07 +01:00
98c9c42366 Update HomeAssistantApp.mc
Fixed debug printing where the method name was wrong. Changes in commented out debug code only.
2024-07-26 16:55:13 +01:00
97030dc1b8 Apply automatic changes 2024-07-26 08:16:05 +00:00
6a2a791146 Update strings.xml
Removed glance scope
2024-07-26 08:56:52 +01:00
1eb2fbed0e Added internationalisation of new strings 2024-07-26 08:50:10 +01:00
a86133fd87 Update HISTORY.md
v2.15 added
2024-07-25 23:36:11 +01:00
0ae39a029f Update HomeAssistantTemplateMenuItem.mc
Template errors now displayed per item.
2024-07-25 20:38:17 +01:00
3cebd106eb Update HISTORY.md
v2.14
v2.14
2024-07-25 08:51:53 +01:00
9471259181 Update BackgroundServiceDelegate.mc (#156)
Put check for methods with 'has' back in.
2024-07-24 09:19:15 +00:00
9030a00d7d Update BackgroundServiceDelegate.mc
Put check for methods with 'has' back in.
v2.13
2024-07-22 22:18:27 +01:00
7bd5e98a1a More responsive status when using a polling delay (#153)
When using a polling delay, an action will trigger an immediate round of
updates.
2024-07-21 16:00:21 +00:00
a49dd6554f More responsive status when using a polling delay
When using a polling delay, an action will trigger an immediate round of updates.
2024-07-20 19:16:42 +01:00
d2fc64836a Update HomeAssistantApp.mc (#152)
When Settings.getPollDelay() > 0, do not wait for this time before the
initial batch of updates, so the app is more responsive on opening.
2024-07-20 17:09:23 +00:00
fc1a0eeb6d Update HomeAssistantApp.mc
When Settings.getPollDelay() > 0, do not wait for this time before the initial batch of updates, so the app is more responsive on opening.
2024-07-20 18:07:37 +01:00
61f6d69e64 Update HISTORY.md
Added a second feature to 2.13 in anticipation.
2024-07-20 17:39:59 +01:00
7f31cecfb5 Added update to telemetry on completion of an activity (#151)
@Someone0nEarth Note we could also add this to the widget version as the
changes are small and probably have a limited effect on the memory
footprint.
2024-07-20 16:37:29 +00:00
98af5578f0 Added update to telemetry on completion of an activity 2024-07-20 17:28:57 +01:00