mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-11-13 04:28:14 +00:00
Space alignment in code (tidy) and v3.6 history amendment
This commit is contained in:
@@ -51,4 +51,4 @@
|
|||||||
| 3.3 | Providing automatic detection for menu definition updates, but still requires an application restart. |
|
| 3.3 | Providing automatic detection for menu definition updates, but still requires an application restart. |
|
||||||
| 3.4 | Fixed a bug where templates failed to display in toggle menu items (at least on some devices). 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. Attempt to fixed an "Out of Memory" bug caused by v3.3 by making automatic checking for menu updates both optional and automatically turned off when insufficient memory is available. This last bug is device dependent and may require another attempt. Internationalisation improvements with thanks to [@krzys_h](https://github.com/krzys-h) for a new automated translations script. |
|
| 3.4 | Fixed a bug where templates failed to display in toggle menu items (at least on some devices). 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. Attempt to fixed an "Out of Memory" bug caused by v3.3 by making automatic checking for menu updates both optional and automatically turned off when insufficient memory is available. This last bug is device dependent and may require another attempt. Internationalisation improvements with thanks to [@krzys_h](https://github.com/krzys-h) for a new automated translations script. |
|
||||||
| 3.5 | Added support for Edge 550, 850 & MTB, Fenix 8 Pro 47mm, GPSMAP H1, Instinct Crossover AMOLED, Venu 4 41mm & 45mm, & Venu X1 devices which also required an SDK update to 8.3.0. The simulation of the Edge 850 device was off, as it failed to update the display and text was the wrong colour, but the buttons menu items operated HA correctly. The assumption is the simulation model is buggy until someone [reports](https://github.com/house-of-abbey/GarminHomeAssistant/issues) otherwise. |
|
| 3.5 | Added support for Edge 550, 850 & MTB, Fenix 8 Pro 47mm, GPSMAP H1, Instinct Crossover AMOLED, Venu 4 41mm & 45mm, & Venu X1 devices which also required an SDK update to 8.3.0. The simulation of the Edge 850 device was off, as it failed to update the display and text was the wrong colour, but the buttons menu items operated HA correctly. The assumption is the simulation model is buggy until someone [reports](https://github.com/house-of-abbey/GarminHomeAssistant/issues) otherwise. |
|
||||||
| 3.6 | Added `numeric` menu item type thanks to [@thmichel](https://github.com/thmichel). This allows you to select a numeric value to set for an entity. Confirmations can now display a user supplied message. [Schema update](README.md#old-deprecated-formats) to keep pace with HomeAssistant and correct a previous decision. |
|
| 3.6 | Added `numeric` menu item type thanks to [@thmichel](https://github.com/thmichel). This allows you to select a numeric value to set for an entity. Confirmations can now display a user supplied message. [Schema update](README.md#old-deprecated-formats) to keep pace with HomeAssistant and correct a previous decision. Schema changes for consistency. |
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ class HomeAssistantNumericMenuItem extends HomeAssistantMenuItem {
|
|||||||
//!
|
//!
|
||||||
//! @param label Menu item label.
|
//! @param label Menu item label.
|
||||||
//! @param template Menu item template.
|
//! @param template Menu item template.
|
||||||
//! @param action Menu item action.
|
//! @param action Menu item action.
|
||||||
//! @param data Data to supply to the action call.
|
//! @param data Data to supply to the action call.
|
||||||
//! @param exit Should the action call complete and then exit?
|
//! @param exit Should the action call complete and then exit?
|
||||||
//! @param confirm Should the action call be confirmed to avoid accidental invocation?
|
//! @param confirm Should the action call be confirmed to avoid accidental invocation?
|
||||||
@@ -120,10 +120,10 @@ class HomeAssistantNumericMenuItem extends HomeAssistantMenuItem {
|
|||||||
WatchUi.pushView(
|
WatchUi.pushView(
|
||||||
dialog,
|
dialog,
|
||||||
new WifiLteExecutionConfirmDelegate({
|
new WifiLteExecutionConfirmDelegate({
|
||||||
:type => "action",
|
:type => "action",
|
||||||
:action => mAction,
|
:action => mAction,
|
||||||
:data => mData,
|
:data => mData,
|
||||||
:exit => mExit,
|
:exit => mExit,
|
||||||
}, dialog),
|
}, dialog),
|
||||||
WatchUi.SLIDE_LEFT
|
WatchUi.SLIDE_LEFT
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ class HomeAssistantService {
|
|||||||
//! Invoke a action call for a menu item.
|
//! Invoke a action call for a menu item.
|
||||||
//!
|
//!
|
||||||
//! @param action The Home Assistant action to be run, e.g. from the JSON `action` field.
|
//! @param action The Home Assistant action to be run, e.g. from the JSON `action` field.
|
||||||
//! @param data Data to be supplied to the action call.
|
//! @param data Data to be supplied to the action call.
|
||||||
//
|
//
|
||||||
function call(
|
function call(
|
||||||
action as Lang.String,
|
action as Lang.String,
|
||||||
@@ -136,10 +136,10 @@ class HomeAssistantService {
|
|||||||
WatchUi.pushView(
|
WatchUi.pushView(
|
||||||
dialog,
|
dialog,
|
||||||
new WifiLteExecutionConfirmDelegate({
|
new WifiLteExecutionConfirmDelegate({
|
||||||
:type => "action",
|
:type => "action",
|
||||||
:action => action,
|
:action => action,
|
||||||
:data => data,
|
:data => data,
|
||||||
:exit => exit,
|
:exit => exit,
|
||||||
}, dialog),
|
}, dialog),
|
||||||
WatchUi.SLIDE_LEFT
|
WatchUi.SLIDE_LEFT
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class HomeAssistantTapMenuItem extends HomeAssistantMenuItem {
|
|||||||
//!
|
//!
|
||||||
//! @param label Menu item label.
|
//! @param label Menu item label.
|
||||||
//! @param template Menu item template.
|
//! @param template Menu item template.
|
||||||
//! @param action Menu item action.
|
//! @param action Menu item action.
|
||||||
//! @param data Data to supply to the action call.
|
//! @param data Data to supply to the action call.
|
||||||
//! @param exit Should the action call complete and then exit?
|
//! @param exit Should the action call complete and then exit?
|
||||||
//! @param confirm Should the action call be confirmed to avoid accidental invocation?
|
//! @param confirm Should the action call be confirmed to avoid accidental invocation?
|
||||||
@@ -44,7 +44,7 @@ class HomeAssistantTapMenuItem extends HomeAssistantMenuItem {
|
|||||||
function initialize(
|
function initialize(
|
||||||
label as Lang.String or Lang.Symbol,
|
label as Lang.String or Lang.Symbol,
|
||||||
template as Lang.String,
|
template as Lang.String,
|
||||||
action as Lang.String?,
|
action as Lang.String?,
|
||||||
data as Lang.Dictionary?,
|
data as Lang.Dictionary?,
|
||||||
options as {
|
options as {
|
||||||
:alignment as WatchUi.MenuItem.Alignment,
|
:alignment as WatchUi.MenuItem.Alignment,
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class HomeAssistantView extends WatchUi.Menu2 {
|
|||||||
var content = items[i].get("content") as Lang.String?;
|
var content = items[i].get("content") as Lang.String?;
|
||||||
var entity = items[i].get("entity") as Lang.String?;
|
var entity = items[i].get("entity") as Lang.String?;
|
||||||
var tap_action = items[i].get("tap_action") as Lang.Dictionary?;
|
var tap_action = items[i].get("tap_action") as Lang.Dictionary?;
|
||||||
var action = items[i].get("service") as Lang.String?; // Deprecated schema
|
var action = items[i].get("service") as Lang.String?; // Deprecated schema
|
||||||
var confirm = false as Lang.Boolean or Lang.String or Null;
|
var confirm = false as Lang.Boolean or Lang.String or Null;
|
||||||
var pin = false as Lang.Boolean?;
|
var pin = false as Lang.Boolean?;
|
||||||
var data = null as Lang.Dictionary?;
|
var data = null as Lang.Dictionary?;
|
||||||
|
|||||||
@@ -24,12 +24,12 @@ using Toybox.Timer;
|
|||||||
//
|
//
|
||||||
class WifiLteExecutionConfirmDelegate extends WatchUi.ConfirmationDelegate {
|
class WifiLteExecutionConfirmDelegate extends WatchUi.ConfirmationDelegate {
|
||||||
public static var mCommandData as {
|
public static var mCommandData as {
|
||||||
:type as Lang.String,
|
:type as Lang.String,
|
||||||
:action as Lang.String?,
|
:action as Lang.String?,
|
||||||
:data as Lang.Dictionary?,
|
:data as Lang.Dictionary?,
|
||||||
:url as Lang.String?,
|
:url as Lang.String?,
|
||||||
:id as Lang.Number?,
|
:id as Lang.Number?,
|
||||||
:exit as Lang.Boolean
|
:exit as Lang.Boolean
|
||||||
}?;
|
}?;
|
||||||
|
|
||||||
private static var mTimer as Timer.Timer?;
|
private static var mTimer as Timer.Timer?;
|
||||||
@@ -52,7 +52,7 @@ class WifiLteExecutionConfirmDelegate extends WatchUi.ConfirmationDelegate {
|
|||||||
function initialize(
|
function initialize(
|
||||||
cOptions as {
|
cOptions as {
|
||||||
:type as Lang.String,
|
:type as Lang.String,
|
||||||
:action as Lang.String?,
|
:action as Lang.String?,
|
||||||
:data as Lang.Dictionary?,
|
:data as Lang.Dictionary?,
|
||||||
:url as Lang.String?,
|
:url as Lang.String?,
|
||||||
:callback as Lang.Method?,
|
:callback as Lang.Method?,
|
||||||
@@ -73,7 +73,7 @@ class WifiLteExecutionConfirmDelegate extends WatchUi.ConfirmationDelegate {
|
|||||||
mConfirmationView = view;
|
mConfirmationView = view;
|
||||||
mCommandData = {
|
mCommandData = {
|
||||||
:type => cOptions[:type],
|
:type => cOptions[:type],
|
||||||
:action => cOptions[:action],
|
:action => cOptions[:action],
|
||||||
:data => cOptions[:data],
|
:data => cOptions[:data],
|
||||||
:url => cOptions[:url],
|
:url => cOptions[:url],
|
||||||
:callback => cOptions[:callback],
|
:callback => cOptions[:callback],
|
||||||
|
|||||||
Reference in New Issue
Block a user