protected override async Task InitDevices() { _frontDoorLock = await _hub.GetDeviceByMappedName <LockDevice>("Lock.FrontDoorDeadbolt"); _smartthingsLock = await _hub.GetDeviceByMappedName <LockDevice>("Lock.SmartThingsFrontDoorDeadbolt"); }
protected override async Task InitDevices() { _livingRoomLight = await _hub.GetDeviceByMappedName <DimmerSwitchRelay>("Switch.LivingRoom"); _frontDoorLock = await _hub.GetDeviceByMappedName <LockDevice>("Lock.FrontDoorDeadbolt"); _alexaLivingRoom = await _hub.GetDeviceByMappedName <Speaker>("Speaker.Alexa-LivingRoom"); _weather = await _hub.GetDeviceByMappedName <Weather>("Misc.Weather"); }
protected override async Task InitDevices() { _frontDoor = await _hub.GetDeviceByMappedName <ContactSensor>("Contact.FrontDoor"); _frontDoorLock = await _hub.GetDeviceByMappedName <LockDevice>("Lock.FrontDoorDeadbolt"); _notificationDevices = new List <Speaker>() { await _hub.GetDeviceByMappedName <Speaker>("Speaker.WebhookNotifier"), await _hub.GetDeviceByMappedName <Speaker>("Speaker.KitchenSpeaker") }; }
public override StartCommandResult OnStartCommand(Intent intent, [GeneratedEnum] StartCommandFlags flags, int startId) { var bundle = intent.Extras; var isLockDeviceAction = bundle.GetBoolean("IsLockDeviceAction"); if (isLockDeviceAction) { Lock = new LockDevice(this); Lock.StartLockDevice(); } else { MenuControlPower = new MenuControlPower(this); MenuControlPower.OpenMenuControl(); } return(StartCommandResult.NotSticky); }
private void InitPowerControl() { Lock = new LockDevice(this); MenuControlPower = new MenuControlPower(this); }