Separate lighting zone controls for battery/AC mode https://github.com/seerge/g-helper/issues/2739

This commit is contained in:
Serge
2024-06-20 13:07:52 +02:00
parent ff92229ecb
commit f21b1e2045
4 changed files with 124 additions and 30 deletions

View File

@@ -196,6 +196,11 @@ public static class AppConfig
return Get(name) != 0;
}
public static bool IsOnBattery(string zone)
{
return Get(zone + "_bat", Get(zone)) != 0;
}
public static string GetString(string name, string empty = null)
{
if (config.ContainsKey(name))