diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/ReconfigurableDevice.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/ReconfigurableDevice.cs index 7b4f1c99..fe548732 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/ReconfigurableDevice.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/ReconfigurableDevice.cs @@ -20,11 +20,16 @@ namespace PepperDash.Essentials.Core.Devices public DeviceConfig Config { get; private set; } protected ReconfigurableDevice(DeviceConfig config) - : base(config.Key) + : this(config.Key) { - SetNameHelper(config); + } - Config = config; + protected ReconfigurableDevice(string key) : base(key) + { + //getting config directly from ConfigReader to avoid the possiblitiy of writing secrets to file + Config = ConfigReader.ConfigObject.GetDeviceForKey(key); + + SetNameHelper(Config); } ///