mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-08-31 19:08:29 +00:00
fix(essentials): Removes enabled property from Environment config. Adds StringEnumConverter to enum properties
This commit is contained in:
parent
6bc966a869
commit
908296793a
4 changed files with 11 additions and 7 deletions
|
|
@ -240,7 +240,8 @@ namespace PepperDash.Essentials.Room.Config
|
|||
|
||||
public class EssentialsEnvironmentPropertiesConfig
|
||||
{
|
||||
public bool Enabled { get; set; }
|
||||
//[JsonProperty("enabled")]
|
||||
//public bool Enabled { get; set; }
|
||||
|
||||
[JsonProperty("deviceKeys")]
|
||||
public List<string> DeviceKeys { get; set; }
|
||||
|
|
|
|||
|
|
@ -213,14 +213,14 @@ namespace PepperDash.Essentials
|
|||
{
|
||||
if (PropertiesConfig.Environment != null)
|
||||
{
|
||||
if (PropertiesConfig.Environment.Enabled)
|
||||
{
|
||||
//if (PropertiesConfig.Environment.Enabled)
|
||||
//{
|
||||
foreach (var d in PropertiesConfig.Environment.DeviceKeys)
|
||||
{
|
||||
var envDevice = DeviceManager.GetDeviceForKey(d) as EssentialsDevice;
|
||||
EnvironmentalControlDevices.Add(envDevice);
|
||||
}
|
||||
}
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -350,14 +350,14 @@ namespace PepperDash.Essentials
|
|||
{
|
||||
if (PropertiesConfig.Environment != null)
|
||||
{
|
||||
if (PropertiesConfig.Environment.Enabled)
|
||||
{
|
||||
//if (PropertiesConfig.Environment.Enabled)
|
||||
//{
|
||||
foreach (var d in PropertiesConfig.Environment.DeviceKeys)
|
||||
{
|
||||
var envDevice = DeviceManager.GetDeviceForKey(d) as EssentialsDevice;
|
||||
EnvironmentalControlDevices.Add(envDevice);
|
||||
}
|
||||
}
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue