mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 12:06:58 +00:00
#742 Adds factory for EssentialsRoomCombiner
This commit is contained in:
parent
377cccf912
commit
dfaaa3f6bc
7 changed files with 398 additions and 376 deletions
|
|
@ -257,7 +257,7 @@ namespace PepperDash.Essentials.Core
|
|||
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.Console(1, "Factory Attempting to create new C2N-RTHS Device");
|
||||
Debug.Console(1, "Factory Attempting to create new GlsPartitionSensorController Device");
|
||||
|
||||
return new GlsPartitionSensorController(dc.Key, GetGlsPartCnDevice, dc);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,9 +46,12 @@ namespace PepperDash.Essentials.Core
|
|||
|
||||
CreateScenarios();
|
||||
|
||||
SetupPartitionStateProviders();
|
||||
AddPostActivationAction(() =>
|
||||
{
|
||||
SetupPartitionStateProviders();
|
||||
|
||||
SetRooms();
|
||||
SetRooms();
|
||||
});
|
||||
}
|
||||
|
||||
void CreateScenarios()
|
||||
|
|
@ -243,4 +246,21 @@ namespace PepperDash.Essentials.Core
|
|||
|
||||
#endregion
|
||||
}
|
||||
|
||||
public class EssentialsRoomCombinerFactory : EssentialsDeviceFactory<EssentialsRoomCombiner>
|
||||
{
|
||||
public EssentialsRoomCombinerFactory()
|
||||
{
|
||||
TypeNames = new List<string> { "essentialsroomcombiner" };
|
||||
}
|
||||
|
||||
public override EssentialsDevice BuildDevice(PepperDash.Essentials.Core.Config.DeviceConfig dc)
|
||||
{
|
||||
Debug.Console(1, "Factory Attempting to create new EssentialsRoomCombiner Device");
|
||||
|
||||
var props = dc.Properties.ToObject<EssentialsRoomCombinerPropertiesConfig>();
|
||||
|
||||
return new EssentialsRoomCombiner(dc.Key, props);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue