mirror of
				https://github.com/house-of-abbey/GarminHomeAssistant.git
				synced 2025-11-04 08:58:13 +00:00 
			
		
		
		
	make setting conditional by using group
This commit is contained in:
		@@ -117,10 +117,12 @@
 | 
				
			|||||||
    <settingConfig type="alphaNumeric" readonly="true" />
 | 
					    <settingConfig type="alphaNumeric" readonly="true" />
 | 
				
			||||||
  </setting>
 | 
					  </setting>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  <setting
 | 
					  <group enableIfTrue="@Properties.cache_config" id="wifiLteExection" title="@Strings.WifiLteExecution" description="@Strings.WifiLteExecutionDescription">
 | 
				
			||||||
    propertyKey="@Properties.wifi_lte_execution"
 | 
					    <setting
 | 
				
			||||||
    title="@Strings.WifiLteExecution"
 | 
					      propertyKey="@Properties.wifi_lte_execution"
 | 
				
			||||||
  >
 | 
					      title="@Strings.WifiLteExecutionEnable"
 | 
				
			||||||
    <settingConfig type="boolean" />
 | 
					    >
 | 
				
			||||||
  </setting>
 | 
					      <settingConfig type="boolean" />
 | 
				
			||||||
 | 
					    </setting>
 | 
				
			||||||
 | 
					  </group>
 | 
				
			||||||
</settings>
 | 
					</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="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="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="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>
 | 
					</strings>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -277,6 +277,10 @@ class Settings {
 | 
				
			|||||||
    //! @return The state of the toggle.
 | 
					    //! @return The state of the toggle.
 | 
				
			||||||
    //
 | 
					    //
 | 
				
			||||||
    static function getWifiLteExecutionEnabled() as Lang.Boolean {
 | 
					    static function getWifiLteExecutionEnabled() as Lang.Boolean {
 | 
				
			||||||
 | 
					        // Wifi/LTE sync execution on a cached menu
 | 
				
			||||||
 | 
					        if (!mCacheConfig) {
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        return mWifiLteExecution;
 | 
					        return mWifiLteExecution;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user