public Notification(string address = null, HAInterface iface = null, List <StateDevice> devices = null, List <Behaviors.BehaviorBase> behaviors = null, string subject = null, string message = null) : base(address: address, iface: iface, devices: devices, behaviors: behaviors) { Subject = subject; Message = message; IntrinsicBehaviors(); }
public Light(string address = null, HAInterface iface = null, StateDevice restrictionDevice = null, StateType restrictionState = null, CommandType idleCommandPrimary = null, string idleCommandSecondary = null, int idleTimeSecs = 0, List <StateDevice> devices = null, List <Behaviors.BehaviorBase> behaviors = null) : base(address: address, iface: iface, devices: devices, behaviors: behaviors) { RestrictionDevice = restrictionDevice; RestrictionState = restrictionState; IdleCommandPrimary = idleCommandPrimary; IdleCommandSecondary = idleCommandSecondary; IdleTimeSecs = idleTimeSecs; IntrinsicBehaviors(); }
public void SetUp() { _data = null; _action = null; _t = new Netomity.Interfaces.Basic.Fakes.StubBasicInterface() { SendString = (data) => { _data = data; }, DataReceivedEvent = (ev) => { _t._DataReceived(ev); }, }; _ha = new Netomity.Interfaces.HA.Fakes.StubHAInterface(iface: _t) { CommandCommand = (command) => { _command = command; return(new Task <bool>(() => { return true; })); }, OnCommandStringActionOfCommand = (address, action) => { _action = action; } }; _sd = new StateDevice(iface: _ha, address: _address); }
public void SetUp() { _data = null; _t = new Netomity.Interfaces.Basic.Fakes.StubBasicInterface() { SendString = (data) => { _data = data; }, DataReceivedEvent = (ev) => { _t._DataReceived(ev); }, }; _ha = new HAInterface(iface: _t); _sp = new SendParams() { SendData = "asdf", SuccessResponse = "asdfgood", FailureResponse = "asdfbad", Timeout = 1, }; }
public StateDevice(string address = null, HAInterface iface = null, List <StateDevice> devices = null, List <BehaviorBase> behaviors = null) { _iface = iface; Address = address; _commandDelegates = new List <Action <Command> >(); _stateDelegates = new List <Action <State> >(); _behaviors = new List <BehaviorBase>(); _state = new State() { Primary = StateType.Unknown }; _Initialize(); RegisterDevices(devices); RegisterBehaviors(behaviors); if (_iface != null) { _iface.OnCommand(source: Address, action: _CommandReceived); } }
public Scene(string address = null, HAInterface iface = null, List <StateDevice> devices = null) : base(address: address, iface: iface, devices: devices) { }
public Motion(string address = null, HAInterface iface = null, List <StateDevice> devices = null, List <Behaviors.BehaviorBase> behaviors = null) : base(address: address, iface: iface, devices: devices, behaviors: behaviors) { IntrinsicBehaviors(); }
public Door(string address = null, HAInterface iface = null, List <StateDevice> devices = null, List <Behaviors.BehaviorBase> behaviors = null, bool isInverted = false) : base(address: address, iface: iface, devices: devices, behaviors: behaviors) { IsInverted = isInverted; IntrinsicBehaviors(); }