mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-01 22:04:52 +00:00
Tested working with GLS-ODT-C-CN hardware
This commit is contained in:
@@ -95,9 +95,21 @@ namespace PepperDash.Essentials.Core
|
||||
});
|
||||
}
|
||||
|
||||
public GlsOccupancySensorBaseController(string key, string name)
|
||||
public GlsOccupancySensorBaseController(string key, string name, DeviceConfig config)
|
||||
: base(key, name)
|
||||
{
|
||||
|
||||
var props = config.Properties.ToObject<GlsOccupancySensorPropertiesConfig>();
|
||||
|
||||
if (props != null)
|
||||
{
|
||||
PropertiesConfig = props;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(1, this, "props are null. Unable to deserialize into GlsOccupancySensorPropertiesConfig");
|
||||
}
|
||||
|
||||
AddPostActivationAction(() =>
|
||||
{
|
||||
OccSensor.OnlineStatusChange += (o, a) =>
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace PepperDash.Essentials.Core
|
||||
|
||||
public GlsOdtOccupancySensorController(string key, Func<DeviceConfig, GlsOdtCCn> preActivationFunc,
|
||||
DeviceConfig config)
|
||||
: base(key, config.Name)
|
||||
: base(key, config.Name, config)
|
||||
{
|
||||
AddPreActivationAction(() =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user