mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 12:44:58 +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)
|
: 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(() =>
|
AddPostActivationAction(() =>
|
||||||
{
|
{
|
||||||
OccSensor.OnlineStatusChange += (o, a) =>
|
OccSensor.OnlineStatusChange += (o, a) =>
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
public GlsOdtOccupancySensorController(string key, Func<DeviceConfig, GlsOdtCCn> preActivationFunc,
|
public GlsOdtOccupancySensorController(string key, Func<DeviceConfig, GlsOdtCCn> preActivationFunc,
|
||||||
DeviceConfig config)
|
DeviceConfig config)
|
||||||
: base(key, config.Name)
|
: base(key, config.Name, config)
|
||||||
{
|
{
|
||||||
AddPreActivationAction(() =>
|
AddPreActivationAction(() =>
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user