public void ExecuteCommand(DeviceCommand command) { IXBeeDevice device = HomeAutomationSystem.DeviceRegistry.GetDeviceById(this, command.DeviceID) as IXBeeDevice; device?.ExecuteCommand(command); }