19 Commits

Author SHA1 Message Date
Philip Abbey
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
Philip Abbey
92d3fbee57 Initial fixes 2024-03-07 21:59:33 +00:00
Philip Abbey
0b80e4546d Corrected a previous incomplete commit
All now "WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String"
2024-01-21 20:43:11 +00:00
Philip Abbey
6e67c4cf2a Removed RezStrings.mc
And in-lined the resource strings fetching.
2024-01-21 20:38:01 +00:00
Philip Abbey
d9ecaf34ee Removed Debug
On some devices it looks like removing the System.println() statements from inside an 'if' clause whose condition is a constant (static constant Globals.scDebug) makes a memory saving. This would suggest the compiler does not propagate constants and prune unreachable code. However in the device of greatest interest debug removal has made no difference to the memory usage. Here the conditional clauses have been turned into comments that can be removed on a case-by-case basis otherwise the debug printing is too voluminous anyway.
2024-01-21 17:53:37 +00:00
Philip Abbey
2be255bb71 Removal of menu identifiers as not actually required
Toggle menu is now consistent with the use of data objects in tap and template. HA 'notify' actions now work.

Co-Authored-By: Joseph Abbey <me@josephabbey.dev>
2024-01-19 18:04:55 +00:00
Philip Abbey
7ffbd84785 Initial working version 2024-01-17 23:31:27 +00:00
Philip Abbey
81762fbf7d Cached 'has' result in initialize()
Also amended a bit of README that was missed and added a memory usage in the RootView for widgets here memory is limited, to serve as a warning to users who are likely to complain.
2024-01-14 19:59:18 +00:00
Philip Abbey
c0787733b7 Amended as required
**/strings.xml need recreating server side.
2024-01-06 21:33:48 +00:00
Philip Abbey
9a268eaf02 Updated RezStrings.mc
Variables are now read only via getters.
2024-01-01 14:17:04 +00:00
Philip Abbey
b039dfbc3b Added RezStrings.mc
The intention is to factorise out many copies of the same string to a central location. Now need to deal with making the variables read-only.
2024-01-01 12:57:50 +00:00
Philip Abbey
ae72313f5e Settings reverted to a static class 2023-12-31 15:55:59 +00:00
Philip Abbey
56155f5f5c Added Watch Battery transmission
Added a background service to send the watch battery level to Home Assistant.
Changed the Glance View as requested by a user.
Updated to new HA icon using SVG in stead of PNG.
2023-12-31 15:22:21 +00:00
Philip Abbey
3934ca53ba New glance and widget views
Added ability to test if we're a widget or a watch-app. Added troubleshooting documentation.
2023-12-21 11:37:30 +00:00
Philip Abbey
4ab25ef860 Comment header update
Corrected spelling of username of contributor.
2023-12-17 12:46:20 +00:00
Philip Abbey
091cc7c2fe Update HomeAssistantService.mc
Amended comment.
2023-12-17 11:57:43 +00:00
Philip Abbey
f086d0d03b Bug fix for devices with API 3.1.0
1) Removed WatchUi.getCurrentView() API call in favour of a new method of ensuring only one ErrorView is pushed at a time.
2) Any error view will be cancelled when responses start working again, e.g. watch gets in Bluetooth range of the phone again.
3) Added error message decoding for misspelled entities.

Co-Authored-By: Joseph Abbey <me@josephabbey.dev>
2023-12-16 17:03:38 +00:00
Philip Abbey
ce90d9d47f Single HomeAssistantService for all Taps
1. Amended code for a single HomeAssistantService for all 'tap's
2. Removed now redundant GET request for taps without a service now that having a service is enforced.
3. Determined that migrating API code from 'toggle's to the HomeAssistantService is awkward due to the close coupling with other methods in the class.
2023-11-20 21:32:35 +00:00
SomeoneOnEarth
ab995db5ba Removed redundant code from spike 2023-11-19 13:24:37 +01:00