Commit Graph
260 Commits
Author SHA1 Message Date
Philip Abbey 60f754f3e3 Update HomeAssistantMenuItemFactory.mc
Reverting picker => data change, as I think the original was correct, compiled and functionally worked.
2025-11-02 17:41:21 +00:00
Joseph Abbey bc5a7d04e4 Schema fixes and move "exit" into "tap_action" 2025-11-02 13:14:48 +00:00
Joseph Abbey ad83988ade Merge branch 'main' into rename-service-to-action
Signed-off-by: Joseph Abbey <me@josephabbey.dev>
2025-11-01 21:23:08 +00:00
Joseph Abbey cac94fecd4 rename service to action 2025-11-01 21:19:10 +00:00
Philip Abbey fc0320aef6 Initial code for user supplied confirmation messages 2025-10-30 17:50:04 +00:00
Philip Abbey 14186b7992 Documentation & source tidy for Lang.Dictionary items. 2025-10-30 11:39:19 +00:00
thmichel f19eb7c276 Fixed compiler warning for unreachable code 2025-10-29 19:18:06 +01:00
Philip Abbey d1f6f6d9d2 Deduped picker variable 2025-10-29 15:14:30 +00:00
Philip Abbey 35333f4d75 Merge branch 'pr/298' into Picker-formatter 2025-10-29 15:13:13 +00:00
Philip Abbey a5ddb65512 Suggested code changes from philipabbey
1. attribute is option, so needs a different template in the API call when absent.
2. Automatically derive the format string from the picker step value for any precision of step.
3. Changed all Lang.String representations of numbers to Lang.Number or Lang.Float. I'm keen to remove the use of strings to hold a numeric value.
4. Tidied up and completed some code comments.
5. Adjusted the JSON schema definition. This is still not finished as the 'picker' object is required for 'numeric' menu items and must not be present for the others. Additional schema changes are required for greater precision.
6. Moved fields over from 'data' to 'picker'.
2025-10-29 14:26:02 +00:00
thmichel b0fa10b2c1 Fixed typo in formatsgtring and error if numeric template didn't return a value 2025-10-29 14:41:32 +01:00
thmichel 6a0ec34cdb Using a picker object to configure the picker now, deriving display format from steps. 2025-10-29 13:54:14 +01:00
thmichel 2cd171637c Reworked numericMenuItem to be able to display a different conten in the sublabel than jus a number. 2025-10-25 21:26:44 +02:00
thmichel 4348c899ae Fixed crash when value was int instead of float 2025-10-16 13:34:39 +02:00
thmichel b34291e41f Code Cleanup 2025-10-13 15:57:00 +02:00
thmichel 7453b40cb1 Corrected settings 2025-10-13 15:53:55 +02:00
thmichel 6609fed35d REmoved credentials from settings 2025-10-11 22:28:50 +02:00
thmichel 9a61c9ce77 Code cleanup 2025-10-11 22:00:43 +02:00
thmichel 2981893af7 Using a Picker to set new value 2025-10-11 21:51:50 +02:00
thmichel 52e2efddd8 Added numeric Menu Item 2025-10-10 11:46:20 +02:00
Philip Abbey 6fc6be2eef Update HomeAssistantApp.mc
Removed debug print statements.
2025-09-30 16:53:04 +01:00
Philip Abbey ac97a8af0d New devices and SDK demanded code updates
The SDK upgrade called for more careful specification of "or Null" on some fields in classes. The new devices have been added with their resource needs. Need to check if there's an issue with Edge 850 device.
2025-09-29 21:00:13 +01:00
Philip Abbey 7ba0d76bf6 Added option to turn off automatic menu update checking
This is because it uses additional memory than can cause some older devices to crash unless they have smaller menus.
2025-09-13 11:06:29 +01:00
Philip Abbey e284cd2d4a 2 Bug fixes
1. Fixed a bug where templates failed to display in toggle menu items (at least on some devices).
2. Fixed a bug where a menu item requesting to exit on completion appeared to indicate failure when using Wi-Fi or LTE. The fix uses a delay in exiting the application modelled as sufficient for a Venu 2 device, so this might need tweaking for other devices.
2025-09-12 14:34:16 +01:00
Philip Abbey c78ca4c318 Fixes 2025-09-07 14:43:18 +01:00
__JosephAbbey 6e735ccd30 Handle null items and values, handle arrays directly under arrays 2025-09-06 16:12:43 +01:00
Philip Abbey 03ff4b570b Initial version 2025-09-05 15:43:01 +01:00
Philip Abbey 27dc66d005 Update HomeAssistantApp.mc
Cosmetic
2025-09-05 10:36:35 +01:00
Philip Abbey 9dbae5a64a Cosmetic
Code tidy
2025-09-05 10:01:24 +01:00
Philip Abbey 7d77a79ad8 Fix for update before Webhook ID (re-)created. 2025-08-15 17:04:54 +01:00
Philip Abbeyand__JosephAbbey 756647d156 Added Setting option to clear the Webhook ID
Co-Authored-By: __JosephAbbey <me@josephabbey.dev>
2025-08-15 15:23:30 +01:00
Joseph Abbey 25cbcfe59a Rename variable 2025-08-15 13:56:46 +01:00
Joseph Abbey 474bd552ad Only re-register sensors if the state has changed 2025-08-15 13:22:29 +01:00
Philip Abbeyand__JosephAbbey 5a0bd98ddb Candidate bug fix for crash opening app from glance
Changed the function parameters on WebhookManager.onReturnRegisterWebhookSensor() to remove the last optional parameter that was causing the error message and this appears to keep the application happy on start up. Looks like an API request race between the glance's last call and the app first call.

Co-Authored-By: __JosephAbbey <me@josephabbey.dev>
2025-08-15 12:56:22 +01:00
Philip Abbey 166b5f4ec3 Found a path to a crash condition
Preventing a de-reference of null when the HA server is unreachable.
2025-08-10 20:50:12 +01:00
Philip Abbey dd484aa615 Fix for settings
HTTP-Headers settings no longer crash the application on the device. Group settings removed as they could be be changed a second time due to a bug in the SDK.
2025-08-10 14:08:52 +01:00
Philip Abbey f224268554 Documentation 2025-08-09 16:36:46 +01:00
Philip Abbey c1cddc54e4 Initial attempt
Lacking an end to end test on this code presently.
2025-08-08 11:40:13 +01:00
Philip Abbey d110826392 Amended Globals.mc
Moved wifiPollDelayMs to Globals class.
2025-07-25 08:38:55 +01:00
Philip Abbey 0d73de494e Tidy 2025-07-24 20:56:08 +01:00
Philip Abbey a686e1a104 Reordered settings 2025-07-24 19:49:44 +01:00
Philip Abbey 8868f2152c Comments & Dictionaries
Reformatted comments to work in VSCode and converted `dict.get(:key)` to `dict[:key]` syntax as its nicer.
2025-07-24 18:54:27 +01:00
Philip Abbey 70f05e8912 Added missing code headers
And included vincentezw in headers for the code he touched.
2025-07-22 22:14:46 +01:00
Philip Abbey 9641313492 Wifi -> Wi-Fi
Amended in presentational aspects only, not in the actual code. "Wi-Fi" is the proper noun and registered trademark.
2025-07-22 22:03:10 +01:00
Vincent Elger Zwanenburg 0b84983eaf use fixed poll delay from const 2025-07-21 21:02:51 +01:00
Vincent Elger Zwanenburg d32135af63 fix setting toggleItem, periodic pulling 2025-07-21 19:45:14 +01:00
Vincent Elger Zwanenburg db3fbd9886 timers as statics, defensive popviews, no double confirmation, add pin
screen onBack, toggle state tweaks
2025-07-19 10:35:35 +01:00
Vincent Elger Zwanenburg be7eed1ae1 early return from fetchApiStatus for in-app wifi, fix typo in docstrings 2025-07-19 10:35:35 +01:00
Vincent Elger Zwanenburg 576f8c4a64 HomeAssistantConfirmationDelegate and HomeAssistantPinConfirmationDelegate undo toggles on timeout and reject 2025-07-19 10:35:35 +01:00
Vincent Elger Zwanenburg 979d85fce5 show toast, not error, in updateMenuItems 2025-07-19 10:35:35 +01:00