mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-07-31 08:58:31 +00:00
make setting conditional by using group
This commit is contained in:
@ -117,10 +117,12 @@
|
||||
<settingConfig type="alphaNumeric" readonly="true" />
|
||||
</setting>
|
||||
|
||||
<setting
|
||||
propertyKey="@Properties.wifi_lte_execution"
|
||||
title="@Strings.WifiLteExecution"
|
||||
>
|
||||
<settingConfig type="boolean" />
|
||||
</setting>
|
||||
<group enableIfTrue="@Properties.cache_config" id="wifiLteExection" title="@Strings.WifiLteExecution" description="@Strings.WifiLteExecutionDescription">
|
||||
<setting
|
||||
propertyKey="@Properties.wifi_lte_execution"
|
||||
title="@Strings.WifiLteExecutionEnable"
|
||||
>
|
||||
<settingConfig type="boolean" />
|
||||
</setting>
|
||||
</group>
|
||||
</settings>
|
||||
|
@ -70,5 +70,7 @@
|
||||
<string id="SettingsEnableBatteryLevel">Enable the background service to send the device battery level, location and (if supported) activity data to Home Assistant.</string>
|
||||
<string id="SettingsBatteryLevelRefreshRate">The refresh rate (in minutes) at which the background service should repeat sending data.</string>
|
||||
<string id="WebhookId">(Read only) The Webhook ID created by the device for background service updates. You might require this for debugging.</string>
|
||||
<string id="WifiLteExecution">Allows the app to start without phone connection, and prompt to execute command over Wifi/LTE.</string>
|
||||
<string id="WifiLteExecution">Wifi/LTE execution mode.</string>
|
||||
<string id="WifiLteExecutionEnable">Enable executing commands over Wifi/LTE.</string>
|
||||
<string id="WifiLteExecutionDescription">Allows the app to start without phone connection (when menu is cached), and prompt to execute command over Wifi/LTE.</string>
|
||||
</strings>
|
||||
|
@ -277,6 +277,10 @@ class Settings {
|
||||
//! @return The state of the toggle.
|
||||
//
|
||||
static function getWifiLteExecutionEnabled() as Lang.Boolean {
|
||||
// Wifi/LTE sync execution on a cached menu
|
||||
if (!mCacheConfig) {
|
||||
return false;
|
||||
}
|
||||
return mWifiLteExecution;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user