mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 03:57:27 +00:00
Fixes UpdateDeviceConfig()
This commit is contained in:
parent
0ded3e30f9
commit
da179c01f5
1 changed files with 160 additions and 160 deletions
|
|
@ -54,11 +54,11 @@ namespace PepperDash.Essentials.Core.Config
|
|||
{
|
||||
bool success = false;
|
||||
|
||||
var deviceConfig = ConfigReader.ConfigObject.Devices.FirstOrDefault(d => d.Key.Equals(config.Key));
|
||||
var deviceConfig = ConfigReader.ConfigObject.Devices.FindIndex(d => d.Key.Equals(config.Key));
|
||||
|
||||
if (deviceConfig != null)
|
||||
if (deviceConfig >= 0)
|
||||
{
|
||||
deviceConfig = config;
|
||||
ConfigReader.ConfigObject.Devices[deviceConfig] = config;
|
||||
|
||||
Debug.Console(1, "Updated config of device: '{0}'", config.Key);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue